Board index » cppbuilder » compiler whit rc for win32

compiler whit rc for win32


2005-02-23 02:31:24 AM
cppbuilder66
Hello:
first sorry for my poor english
I've the free command line borland C++ compiler v5.5 for do application whit
PSDK WIN32
I tried to use the resource file in my littel application. the resource is a
DIALOG but i don't know if a have to use particular option
of the linker.
the problem is: when i execute my application, it do nothing
CODE OF MAIN
#define STRICT
#define Win32_LEAN_AND_MEAN
#include <windows.h>
int WINAPI
WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int
nCmdShow)
{
DialogBoxParam(0,"MyDialog",0,0,0);
return 0;
}
I compile with bcc32 -tW(Application for win) and no problem it do the exe
file
CODE OF RC
#include <windows.h>
MyDialog DIALOG DISCARDABLE 0, 0, 186, 92
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "nothing"
FONT 8, "MS Sans Serif"
BEGIN
END
I compile with brcc32 -i (path of the include) and it do the res file
LINK
When i do brc32 MyDialog.res MyApp.exe, I call the link and finish well
but if now execute MyApp.exe it do notthing.
Why??
brc32 need a option for link application for win?
I have to use ilink32?? the reference manual tell: use the brc32
 
 

Re:compiler whit rc for win32

Hi
I've compiled your program and you should compile it like that to make
it working:
brcc32 prog.rc
bcc32 -tW -c prog.cpp
and then use ilink32:
ilink32 -tW prog.obj c0w32,,,import32 cw32,,prog.res
In help files included in bcc55 is good description of all options in
bcc32, brcc32, ilink32...
I've tried brc32 method but it don't working, I don't know why.
Michal Strug