Archived

This topic is now archived and is closed to further replies.

razor2002

help please

Recommended Posts

Hi i am new at Open gl i started to get into this a few days ago after i saw some open gl apps. ive followed some online tutorials and tried making some open gl stuff. well i have a little problem, i have borland v5.5 (free) and when i put in a code for open gl i get a error: Error: Unresolved external ''_main'' referenced from D:\C\C0X32.OBJ in order to compile it i do this: i have the .cpp file and in dos i put in: bcc32 -tW "the program name here".cpp i do knot know if there is a different command to make an open gl app or soemthing i dont know, i also tried it without the -tW and then i get like 8 errors. Also i noticed that many online tutorials just say go to : file>>new project>> ect.. and i have no clue what are they talkin about cause borland dosent have an actuall windows program its just in DOS. Is there a different program for that that i dont know about? if anyone would take their time to clear this up for me i would really appreciate it. Some links to easy to understand tutorials would help also , thanx! i am also a novice c++ programer.And web master thanx for your time.

Share this post


Link to post
Share on other sites
dont know much about the borland compiler but unresolved external _main usually means you are compiling a windows program (which entry point is WinMain, and not main) as a console (DOS) app, check your command line options to see what is it that you should use.

the "file>>new project>> etc.." instructions you have seen refer to the compilers IDE, which is an aplication with menus, toolbars and what not that makes using the compiler easier, id'' say 75% of the time they refer to the Visual C++ IDE, the other 25% refers to dev-c++ borland C++ builder, etc, etc. they usually tell you what compiler and IDE they are using so just pay attention to that.

also remember that you need to link with the proper libraries like opengl32.lib and glu32.lib as well as some other windows libraries like gdi32.lib, user32.lib and so on.

Share this post


Link to post
Share on other sites
I think the -tW directive should be enough to make the compiler understand that the entry point is WinMain. At least it works for me to compile NeHe''s first tutorial using "bcc32 -tW lesson1.cpp". Some warnings appear, but it compiles and runs.

Share this post


Link to post
Share on other sites