Hi Vailton, I understand your problem, and it's caused by the way hbmk2 compiles and links .rc files. It currently uses .o for the extension for compiled .rc files, which collides with compiled sources with the same filename. The .o extension is used because windres (while it also supports std .res output) has to compile resources into coff format so that it can be used with gcc in link phase. If someone knows a way to "teach" gcc.exe to understand *standard* .res files, please speak up.
I'll modify hbmk2 to use .res extension for the coff compiled resources, until we find a way to switch to real .res files. Another consequence of the above is that you cannot feed .res files pre-compiled with other tools to hbmk2 when using MinGW. This could be resolved by adding .res to coff res conversion to hbmk2 in MinGW mode, but I'll leave that for later. [ Your English is perfectly fine! ] Brgds, Viktor On Mon, Apr 13, 2009 at 9:06 PM, Vailton Renato <vail...@gmail.com> wrote: > Hi Viktor! > > I'm using hbmk2 in all my projects and working with MinGW + Win7 I > found a small problem with RC files. I created a single test in the > hope of contributing to the solution of the problem .. are basically 3 > files: > > t.prg file: > function main () > alert ( "Hello world!") > return > > t.rc file: > 1 RCDATA test.txt > > test.txt file: > "This is a single test!" > > > hbmk2 with option "-hbcmp" override the file generated from t.prg with > the contents of t.rc compiled and the linker fails: > > C:\harbour\k>hbmk2 -hbcmp -trace -info t.prg > hbmk: Using Harbour: C:\hbmsvc\bin C:\hbmsvc\include C:\hbmsvc\lib > C:\hbmsvc\lib > > hbmk: Processing configuration: c:\hbmgw\bin\hbmk.cfg > hbmk: Harbour compiler command (internal): > C:\hbmsvc\bin\harbour.exe -n2 t.prg -iC:/hbmsvc/include > Harbour 1.1.0dev (Rev. 10795) > Copyright (c) 1999-2009, http://www.harbour-project.org/ > Compiling 't.prg'... > Lines 4, Functions/Procedures 1 > Generating C source output to 't.c'... Done. > hbmk: C compiler command: > gcc.exe t.c -O3 -c -ot.o -IC:/hbmsvc/include -LC:/hbmsvc/lib > -LC:/hbmsvc/lib > -mconsole > > C:\harbour\k>hbmk2 -trace -info t.o t.rc > hbmk: Using Harbour: C:\hbmsvc\bin C:\hbmsvc\include C:\hbmsvc\lib > C:\hbmsvc\lib > > hbmk: Processing configuration: c:\hbmgw\bin\hbmk.cfg > hbmk: Resource compiler command: > windres t.rc -o t.o > t.rc:1:18: warning: no newline at end of file > hbmk: C compiler command: > gcc.exe C:\Users\VAILTO~1\AppData\Local\Temp\hbmk_uo67z8.c t.o t.o -O3 > -ot.exe > -IC:/hbmsvc/include -LC:/hbmsvc/lib -LC:/hbmsvc/lib -mconsole > -Wl,--start-group > -lhbcpage -lhblang -lhbcommon -lhbcplr -lhbdebug -lhbvm -lhbrdd -lhbusrrdd > -lhb > uddall -lhbhsx -lhbsix -lrddntx -lrddnsx -lrddcdx -lrddfpt -lhbrtl -lhbpp > -lhbma > cro -lhbextern -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbpcre > -lhbzlib > -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 > -lcomdlg3 > 2 -lshell32 -lole32 -loleaut32 -luuid -lmpr -lwinmm -lmapi32 -limm32 > -lmsimg32 - > Wl,--end-group > C:\Users\VAILTO~1\AppData\Local\Temp/ccOw5Mpx.o:hbmk_uo67z8.c:(.text+0x5): > undefined reference to `HB_FUN_MAIN' > collect2: ld returned 1 exit status > hbmk: Error: Running C compiler. 1: > gcc.exe C:\Users\VAILTO~1\AppData\Local\Temp\hbmk_uo67z8.c t.o t.o -O3 > -ot.exe > -IC:/hbmsvc/include -LC:/hbmsvc/lib -LC:/hbmsvc/lib -mconsole > -Wl,--start-group > -lhbcpage -lhblang -lhbcommon -lhbcplr -lhbdebug -lhbvm -lhbrdd -lhbusrrdd > -lhb > uddall -lhbhsx -lhbsix -lrddntx -lrddnsx -lrddcdx -lrddfpt -lhbrtl -lhbpp > -lhbma > cro -lhbextern -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbpcre > -lhbzlib > -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 > -lcomdlg3 > 2 -lshell32 -lole32 -loleaut32 -luuid -lmpr -lwinmm -lmapi32 -limm32 > -lmsimg32 - > Wl,--end-group > > C:\harbour\k> > > > It is common use in MiniGUI, FW, etc.. a resource file with the same > name that contains routines for manipulating the dialogs/controls. And > I read the source in this case it uses for compiled RC the same > extension that the object files (*.o). > > Best Regards, > Vailton Renato > > PS: Sorry for bad english. =D > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour >
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour