http://gametutorials.com/Tutorials/win32/Win32_Pg2.htm
I used both the menu examples, and the borland compiler gave warnings on both of them, neither gives a menu.
anyway a screenshot of the warnings
http://gametutorials.com/Tutorials/win32/Win32_Pg2.htm
I used both the menu examples, and the borland compiler gave warnings on both of them, neither gives a menu.
anyway a screenshot of the warnings
Looks like just warnings of unused variables to me....
In C, just add the following before the function definition:
#pragma argsused
It'll disable the warning message.
Or, you could just disable the warnings with the '-w' switch, ie:
-w-8004 -w-8057
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
I think I might have to compile the .rc file with the cpp file, but I don't know how, I guess I mistiled the post, but the objective is to get the menu to function.
Edit: I'm missing a afxres.h header file apparently, so I can't compile the .rc file
Last edited by Dark Nemesis; 08-31-2003 at 10:04 AM.
you mean that you need a resource compiler?
>>you mean that you need a resource compiler?<<
The borland command line tools come with a resource compiler (brcc32.exe).
>>I'm missing a afxres.h header file apparently, so I can't compile the .rc file<<
If you are using a resource script created by one of the various ms visual c++ ide's then you will have to manually edit the resource script to remove all the ms specific junk so that it can be compiled with bcc55 command line tools. You need #include <windows.h>, you'll need the specific resource definition statements (MENU etc) but all the afx junk should be removed.
When it comes to compiling you also need to use the -c switch when compiling your source (cpp/c) file(s) so that objects are compiled but not linked.
brcc32 your_script.rc will compile the resource script, your_script.rc to a *.res object. The final stage is to invoke the linker (ilink32.exe) to link the compiled source and the compiled resource(s) into the final executable.
The reason that you need to do it this way is that you can't link resources into a built exe, despite the borland documents saying you can.
There is an example of compiling resources with bcc55 cmd line on my wee humble web page (resources-->dialog box & controls) which should give you an idea of working with windows resources with the borland command line tools.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Ken Fitlike> I used you project example from the page you sugested and followed the directions in the readme, but when I run the program it can't find cow32.obj and deletes the .exe, any solutions? Borland kept giving errors with the tutorial files from gametutorials, and I couldn't compile. Line 10 (the language line) wasn't terminated correctly.
Have you properly created your bcc32.cfg and ilink32.cfg configuration files as described here?
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
thank you, I had made a bcc32.cfg, but not an ilink.cfg