Trouble with Borland C++
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.
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.
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.
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?
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.
To compile a Windows app run BCC32 -tW. This is all assuming you''re running the free tools, of course.
Ok that problem is fixed. But now it comes up with the same error only with the function Direct3dCreate8.
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.
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.
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..
Oh! you''re not linking d3d.lib, are you? another possibility...
------------------------------
BCB DX Library - RAD C++ Game development for BCB
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement