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 / Linking issues with D3DLib and Terrain lib

Author
Message
ralthan
14
Years of Service
User Offline
Joined: 23rd Nov 2009
Location:
Posted: 29th Dec 2009 18:54
Hi,

I am converting my project from DBP to GDK and for the most part it has been going pretty good. I recently got to the terrain loading part of the code and included it in last night and got this error when linking:

Error 1 error LNK2005: "struct IDirect3DDevice9 * g_pD3DDevice" (?g_pD3DDevice@@3PAUIDirect3DDevice9@@A) already defined in terrain.lib(Basic.obj) D3Dfunc.lib

I was using the D3DLib functions with no issues.. just this code caused the linker issues.



Seems to me like something is conflicting between the two libs, but I cannot tell. Tried searching the board and found nothing besides the initial linker issues (MTd vs. MT).. I already went through those.

Any help would be appreciated.. been pulling my hair out trying to figure this one out.
bloodmage2
15
Years of Service
User Offline
Joined: 14th Jun 2009
Location:
Posted: 13th Jan 2010 04:08
did you make a project with the darkgdk wizard?
if you did, then check if you are using multiple files, if you are check that darkgdk is not included twice, one after another, as in it is included in a .h, and that .h is included into a .cpp, which then includes darkgdk

-to the optimist, the glass is half full. to the pessimist, it is half empty, to the engineer, it is twice as big as it needs to be.
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 6th Mar 2010 07:11 Edited at: 6th Mar 2010 07:24
I was getting this error.

ralthan did you find a solution? I fixed it by renaming

g_pD3DDevice to g__pD3DDevice

Login to post a reply

Server time is: 2024-11-19 15:12:11
Your offset time is: 2024-11-19 15:12:11