Jump to content
  • Advertisement

Archived

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

Vecna

Trouble with Borland C++

This topic is 6013 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

Hi there, I''m currently learning DirectX 8 and I made a simple app that compiles fine but comes up with an error when it links. It reads as follows: Error: Unresolved external ''_main'' reference from C:\BCPP\LIB\C0X32.obj If anyone knows what this means I would greatly appreciate a reply so I can go on to some more learning of DirectX . Thank you.

Share this post


Link to post
Share on other sites
Advertisement
make sure you have some kind of main function (main or WinMain)
and you compile for the right platform. if you compile a
windows console application, and you defined WinMain, you get
this error, because the linker expects a ''main''-function
for your console application.

Share this post


Link to post
Share on other sites
I have the function WinMain as my entry point function. Also, how do you specify which type of application(win32 or console) you want to compile?

Share this post


Link to post
Share on other sites
I''m not sure exactly what you''re doing, but it sounds as if you have the free tools. Anyway, the main problem is that it''s linking with the wrong crt0... you want C0W32.OBJ (I think).

To compile a Windows app run BCC32 -tW. This is all assuming you''re running the free tools, of course.

Share this post


Link to post
Share on other sites
Ok that problem is fixed. But now it comes up with the same error only with the function Direct3dCreate8.

quote:

Error: Unresolved external ''Direct3Create8'' referenced from C:\BCPP\BIN\MAIN.OBJ



I am guessing that it is not linking the DirectX library files? Even though I included the pathname of the .lib''s in the command line. Forgive me if I sound like a moron here, but I have only been using this compiler for 1 day . Thanks for the help so far

P.S. - I am using the free compiler, not C++ Builder.

Share this post


Link to post
Share on other sites
well, do remember that the standard, .lib files from microsoft are ms (yes, ms, not m$, since I started using .NET and it''s actually pretty cool, but that''s wayyy off topic) only.
Maybe you already have the borland specific libraries, if so... then it should work. You can get the lib''s from my now-dead-site (hasn''t been updated in months) in the sig.
How did you include the pathnames? you probably did it right, but then again... you never know.
I haven''t messed with the borland command line compiler in a while, but #pragma link usually works...ala..

#pragma link "d3d8.lib"

Oh! you''re not linking d3d.lib, are you? another possibility...


------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites

  • 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!