Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Linker... again.

Author
Message
Charles Black
16
Years of Service
User Offline
Joined: 9th Mar 2008
Location:
Posted: 20th Mar 2008 02:26
Now I'm close to the edge of giving up.

Please, help me. I already searched the forum for answers of my linker problem, but that only gave me more problems... Before, I had 3 LNK2019 errors. Then, when I did something *the forum* told me, I got 880 errors more. Although now, using something *the forum* told me, I got it down to 263. Please, help me. I already installed DirectX SDK of March/2008, I already changed the order of my library files... please. These are my errors:

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 20th Mar 2008 14:59
Have you setup the DirectX Include and Lib paths in VS?

Much good work is lost for the lack of a little more.
Rye
21
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 20th Mar 2008 16:05
general method for installing everything you need.

Install VS express 2008 (i assume thats what you're using)

Install the AUGUST 2007 direct X sdk. You MUST install this version otehrwise you get errors.

Then install the Dark GDK

installing done, time to make sure everything is set up.

Open VS2008.
Menu -> Tools -> Options
In the tree on the left of the options box, open up the "Projects and solutions" branch
Click on VC++ Directories.

Top Right drop down box, "show directories for"

choose "Include Files"
these are the ones you need.
C:\Program Files (x86)\Microsoft DirectX SDK (August 2007)\Include
C:\Program Files (x86)\The Game Creators\Dark GDK\Include

now choose "Library Files"
you need these ones
C:\Program Files (x86)\Microsoft DirectX SDK (August 2007)\Lib\x86
C:\Program Files (x86)\The Game Creators\Dark GDK\Lib\vs9

close VS and open up this folder
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCProjectDefaults
and find the file "CoreWin.vsprops"


in this file there is a line AdditionalDependencies=...
make sure that it reads like this one.

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"

they are steps i take every time. Ive found when i install VS i always get a couple of linker errors the first time i compile something. Usually because something is missing on that line.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 16:33
Okay, you are closer than you think. I don't know how you got here, but...look at the errors. You have not got any of the DirectX libraries in your dependencies list, meaning the linker can't find all of those functions. They are all DirectX functions.

In the Project Properties, there is an item...linker input. There is an item right at the top, Additional dependencies. Click the little '...' on the side, and type in the following:
dxguid.lib
d3d9.lib
d3dx9.lib

Then Apply, and recompile...come straight away back here and tell me what happened.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 20th Mar 2008 16:37
If the paths are setup correctly in VS then you don't need to add the additional dependencies.

Much good work is lost for the lack of a little more.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 16:40 Edited at: 20th Mar 2008 16:43
Not true. All that does is tell it where to look. The dependencies list is how it knows what lib to look in.

Actually, there is also the ability to #pragma it.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 20th Mar 2008 16:45 Edited at: 20th Mar 2008 16:46
Sorry to digress here Charles but, Jinzai I have been using GDk for quite some time now and have never needed to add the DX libs to the additional dependencies. I would imagine that the libraries are included into the build via the headers much like GDK includes it's libraries.

e.g.



Edit:

Quote: "Actually, there is also the ability to #pragma it. "


Precisely.

Much good work is lost for the lack of a little more.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 16:48 Edited at: 20th Mar 2008 16:55
Those are GDK libs, not DX9. Trust me, that is what the linker is saying in this case...I can't find the functions in the libraries you have me looking in.

Honestly, its not about GDK, this is about the linker, which I have been using a long time, as well.

You have March 2008 DXSDK, and yet all the paths point to Aug 2007 DX SDK. ?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 20th Mar 2008 16:56
Quote: "I would imagine that the libraries are included into the build via the headers much like GDK includes it's libraries."


Yeah I know what you are saying, but what I mean is that the DirectX headers will probably use the same method of including the libraries.

But yeah, this is definitely an issue with VS not being able to find the libraries that contain the required functions.

Much good work is lost for the lack of a little more.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 17:04 Edited at: 20th Mar 2008 17:07
No, they don't. You have to put them in like I said.

However, I imagine that a project started with the wizard provided would do that. That I can see. Your install is pretty messed up, and did you start the project with a wizard?

@monotonic...I understand what you are saying, but the linker is saying...do what I just said. I don't mean to sound rude...sorry.

In fact, let me be more specific. I use DX9 alot in my own VS projects. That is the process...include the appropriate include files, and link to the appropriate library. Those three libs all have to be added like I said in those cases.

GDK probably does help with that, but if it isn't installed/used correctly, it won't build.
Rye
21
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 20th Mar 2008 17:14
looking at my projects, i cant see any reference to specific libs. I dont think they are needed.

if you look at the errors, they have this kind of thing in them.
D3DXMatrixRotationZ@8

i dont think it can find the header files, since things like that are defined in the DX headers.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 17:19 Edited at: 20th Mar 2008 17:20
If it can't find the include file, it generates a compiler error, usually "cannot include filename", or something like that. This is a linker error.

error LNK2019: unresolved external symbol

That is always a library. LNK means linker. Look up the help on it.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 20th Mar 2008 17:19
Quote: "No, they don't. You have to put them in like I said."


Nope! like I say I have compiled many projects with the GDK and never done this, with or without the wizards. I have just double checked this just in case. I created an empty Win32 app, added a source file with this code:



Compiled it, and all was well! I can assure you that you do not need to add the DirectX libraries to the additional dependencies. The paths need to be setup, and all will be well. I think you cracked it in your earlier post - You have March 2008 DXSDK, and yet all the paths point to Aug 2007 DX SDK. ?

Much good work is lost for the lack of a little more.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 17:23 Edited at: 20th Mar 2008 18:22
That comment was to say that DX9 include files do not use #pragma to set library dependencies.

I said that in my projects I have to do that. Let me look at the GDK headers again.

I noticed this in the post above:

C:\Program Files (x86)\Microsoft DirectX SDK (August 2007)\Include
C:\Program Files (x86)\The Game Creators\Dark GDK\Include

C:\Program Files (x86)\Microsoft DirectX SDK (August 2007)\Lib\x86
C:\Program Files (x86)\The Game Creators\Dark GDK\Lib\vs9


My GDK has the GDK paths before the DX9 paths, and also, there is no (x86) in my path, either.

Make sure that they are in the order of GDK directories at the top of the list, not the DX9. The dependencies are tied to the order in which the libraries are searched, I think.
Charles Black
16
Years of Service
User Offline
Joined: 9th Mar 2008
Location:
Posted: 20th Mar 2008 19:10
Quote: "...
In the Project Properties, there is an item...linker input. There is an item right at the top, Additional dependencies. Click the little '...' on the side, and type in the following:
dxguid.lib
d3d9.lib
d3dx9.lib
Then Apply, and recompile...come straight away back here and tell me what happened."


This didn't work... I'm trying the other things. And, I have the March 2008 DirectXSDK... why do you say it works with the August 2007 and not with this most recent one? Also, Rye, what you said is exactly what I have... except for the DirectX SDK version, which I'm downloading right now.
Rye
21
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 20th Mar 2008 20:54
yeh, i had the most recent one and i got errors.

but since its DX 9 that gdk uses, you dont really need the new version which will probably only have updates for DX 10.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2008 22:55
GDK is built using DX9C Aug 2007. That is why noone needs those library dependencies set, its already been built.

You are getting errors because the libs GDK was built with do not match the libs in your search path, which makes it try to rebuild GDK.

I think that you should uninstall DX9, uninstall DX SDK, uninstall VC++, and redo it with the correct versions, and in the correct order.
Charles Black
16
Years of Service
User Offline
Joined: 9th Mar 2008
Location:
Posted: 21st Mar 2008 00:54
Thanks jinzai. I'll try that.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Mar 2008 19:00
Yeah....

Quote: "
And, I have the March 2008 DirectXSDK... why do you say it works with the August 2007 and not with this most recent one?"


Because he doesn't get errors and you do! LOL

Charles Black
16
Years of Service
User Offline
Joined: 9th Mar 2008
Location:
Posted: 24th Mar 2008 19:38
Well, now that I have installed the August 2007 DirectXSDK, it's working! I got the HelloWorld to compile! Thanks to everyone on this thread

Login to post a reply

Server time is: 2024-11-20 05:25:03
Your offset time is: 2024-11-20 05:25:03