Linker error.... help!

Started by
15 comments, last by kalash 20 years, 9 months ago
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
Advertisement
It might be useful if you actually post the error here...

You can build/link DX8 apps with the DX9 runtime just fine.

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

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

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).

Kippesoep
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.
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
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
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 ?
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.
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

This topic is closed to new replies.

Advertisement