Archived

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

kalash

Linker error.... help!

Recommended Posts

I have a very odd linker error in VC++, i was thinking is it possible because of the following: I have the DirectX 9.0 runtime installed, but i use 8.0 SDK / headers and libraries.... when i compile my code everything is fine, but when i wan''t to build the exe file i get linker errors. I am assuming the dynamic libraries are not being linker well with my code and libraries.... reason: dynamic ones are for 9.0! and i right? I can''t change my SDK 8.0 to 9.0 cos i am not really sure what 9.0 does differently and all the documentation i have for my project is in sdk 8.0 Thank in advance, kalash

Share this post


Link to post
Share on other sites
There should be a #define you can set to specify the DX version

#define _something_ 0x800 //defines DirectX version 8

not sure what the _something_ is supposed to be but it''s in the SDK somewhere



Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]


GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!

Share this post


Link to post
Share on other sites
quote:
Original post by Sander
There should be a #define you can set to specify the DX version

#define _something_ 0x800 //defines DirectX version 8



That would be D3D_SDK_VERSION (and it should be 0x200 for DX8). However, he states he''s using the DX8 SDK (so there should be no need for this), with the DX9 runtime (which isn''t a problem).

My guess as to the cause of the problem would be an incorrect setup for the directories where MSVC looks for libraries. Something like C:\DXSDK\lib being at the end of the list instead of at the beginning. That would cause MSVC to link against its own versions of the DX libs (version 5 or something similarly pathetic).

Share this post


Link to post
Share on other sites
This might help the problem:

Save the help file for the dx8SDK (for reference when programming in 8) Then get the dx9SDK. 9 Still allows you to compile in 8 (I know it does because I used the 9 sdk to compile one of my dx8 engines) That will probably help the problem, unless its one of those strange, freaky vc++ linker errors

Just remember to save the old docs - cuz dx9 does not come with dx8 docs for reference.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Perhaps you forget to add the DX .lib files you need in Project->Settings->Link->(category)General->Object/Library Modules????!??!

Common mistake, I made it myself several times...

Cheers!
Blort

Share this post


Link to post
Share on other sites
Hey guys i am still at work, programing in Java, as soon as i get home i''ll write out the correct Linker error code and description.

Thanks so much for all your different views on what to do.

I really love this forum!!

Regards to all,

kalash

Share this post


Link to post
Share on other sites
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/begin.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

begin.exe - 2 error(s), 0 warning(s)


+++++++++++++++++++++
Thats my error can u help ?

Share this post


Link to post
Share on other sites
either that--or when you loaded it--you only loaded the cpp file and not the workspace--when you automatically build the workspace--it always does the console application. That annoyed me quite a bit. One bad habit of mine got broken that week.

Share this post


Link to post
Share on other sites
Well i know whats a console app so it''s not that... i made a Win32 application... but weathrich i am not of english origin, can u try say again what u said... i think my problem is exactly what ure saying ... i think its of that nature, cos nothing else can be wrong.

Tell me again weathrich

Share this post


Link to post
Share on other sites
quote:
Original post by wheatrich
either that--or when you loaded it--you only loaded the cpp file and not the workspace--when you automatically build the workspace--it always does the console application. That annoyed me quite a bit. One bad habit of mine got broken that week.


what do u mean "when you automatically build the workspace" ? i go to new project type in the name, select Win32 app and then add my own cpp files and headers, what do i do wrong? In source and header and resouce folders. By the way i create a blank Win32 app.

Share this post


Link to post
Share on other sites
What that linker error is saying is that your Win32 application doesn''t have a WinMain.

You know that Win32 applications use WinMain() as their entry point, not main(), right?


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites