User forums > Help

Linking .res file (in .dll)

<< < (2/2)

Defender:
Hmm...

Are you sure, that the *.res file is correct? This message means, that the linker finds the file correctly, but it cannot recognize the content.

How is this opt.res built?

download123:
It's build with an res editor
[XN Resource Editor]

[http://www.mytempdir.com/893134 there is an upload of it]

kkez:
I was able to open your .res file with the Visual C++ resource editor, while i wasn't when i tried one of my res files that windres outputs when compiling a .rc file. Two different files from two different compilers, just like the object files from mingw and microsoft's compiler. So you have two options:
1) compile your project and the res file with the microsoft compiler
2) save your resources in a .rc file (from the resource editor) and compile it with the mingw's windres.

EDIT: Well, Visual C++ can do the job for you (the res 2 rc "translation").
The rc file is attached, just add it to your project and compile, although i don't think that windres will compile all that mess that microsoft add to the .rc file. Remove it if it complains, it's useless. Of course you need to remove the .txt extension.

EDIT: in 3 kb of file the only useful thing is:

--- Code: ---#include "resource.h"
#include <windows.h>

1 DIALOG /*FIXED IMPURE (impure? lol)*/ 0, 0, 186, 95
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
    WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
FONT 8, "MS Shell Dlg"
BEGIN
    CONTROL         "Welcome Message",1,"Button",BS_AUTOCHECKBOX |
                    WS_TABSTOP,5,16,76,14,WS_EX_NOPARENTNOTIFY
    CONTROL         "Goodbye Message",2,"Button",BS_AUTOCHECKBOX |
                    WS_DISABLED | WS_TABSTOP,5,36,76,14,WS_EX_NOPARENTNOTIFY
    CONTROL         "Show only on next Start",3,"Button",BS_AUTOCHECKBOX |
                    WS_TABSTOP,5,56,100,17,WS_EX_NOPARENTNOTIFY
    PUSHBUTTON      "Reset",4,127,57,50,14,0,WS_EX_NOPARENTNOTIFY
END
--- End code ---

EDIT: ciao :)

[attachment deleted by admin]

download123:
oh well thank you..

so it was my fault...

in this fact there is an other question :
Is there any free resource creator that creates directly the .rc and .h
*withour VC++*

Navigation

[0] Message Index

[*] Previous page

Go to full version