Jump to content
  • Advertisement
Sign in to follow this  
stalwyn

Beginner question about linking an OpenGL with bcc32

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey there. I’m trying to make the source code from lesson 1 of NeHe’s web tutorial and I’ve come across a problem with I home someone can help with. It compiles fine using Borland C++ 5.5, but when I link it I get this error: Error: Unresolved external '_main' referenced from C:\\BORLAND\BCC55\LIB\C0X32.OBJ I looked this up and it said it’s to do with linking to the wrong entry point as the example enters at WinMain instead of main, saying that the answer was to add the option ‘-W’. I tried this but still get the “Unresolved external '_main” error. Any tips about this I could get would be great. Incidentally, I compile with this command line argument: bcc32 -c -q -O1 -v –W -wdef -wnod -wamp -wprc -wuse -I"C:\\Borland\BCC55\Include" lesson1.cpp and linking with this: ilink32 -v -Tpe -ap -wrty -c -L"C:\\Borland\BCC55\Lib";"C:\\Borland\BCC55\Lib\psdk" .\lesson1.obj c0x32.obj import32.lib cw32.lib

Share this post


Link to post
Share on other sites
Advertisement
You are trying to link against c0x32.obj which is for console applications. Although you use the correct switch to compile YOUR code, the c0x32.obj file is Borland's and requires _main to exist somewhere. You need to link against the appropriate Borland obj file. Unfortunately, I don't know what that is off the top of my head, but the easiest way to resolve this problem would be to create a brand new Windows Application (NOT Console Application) project and copy the lesson01 code into that. That should set up your app to link against the appropriate libraries.

Share this post


Link to post
Share on other sites
Bah, I just realized you might be using just the command line tools. So, try replacing c0x32.obj with c0w32.obj and realize it's been years since I touched a Borland tool chain. =P

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!