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 / DarkPhysX integeration - help with linker error!

Author
Message
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 3rd Sep 2008 00:16
I've no problem with using DarkLights and DarkAI, but DarkPhysics is giving me a headache! I can't get it to work!

I'm running Visual Studio 2005 under Windows XP SP2 and the latest DP update from TGC gurus!

No fancy code, even if I try to start the DP, I'll get this error!
Quote: "fatal error LNK1257: code generation failed"

Any ideas?!!!

I can't even compile this simple code! ( just using dbPhyStart ( ) for example! )


Any help would be greatly appreciated...
-Try
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 3rd Sep 2008 16:33 Edited at: 3rd Sep 2008 16:41
for DarkPhysics to be able to run properly, you will need to tell your linker where to find its library files(even if its in the same place as other GDK libs) and where to find its header files(if the header isnt where the other GDK ones are), and link to the DarkPhysics.lib file manually as an additional dependancy.. thats what i had to do anyway.. the libraries arent debug versions either(as far as im aware, I could be wrong), something to keep in mind

The other error you may recieve is "NxCooking.dll is missing" or something similar after you get the app to compile and start running, this is because the version of the PhysX drivers DarkPhysics is using has a dependancy on 4 files that will need to be in you projects main directory, you can find the relevant files in the Dark Physics sample projects directories( that is just where i got them, as i couldnt find the correct version ones anywhere else and was getting strange compile errors), they are -- "NxCooking.dll" "PhysXLoader.dll" "NxCharacter.dll" "NxExtensions.dll" .. i had to copy those 4 files into my project directory to make the project find it upon execution. If there is a better way to do this with GDK I dont know it( i have only just started playing with it myself ), the current version of PhysX SDK native apps dont require these files to be redistributed to end-users anymore with programs though as the runtime drivers point the app to the correct version now, so perhaps when TGC have the time to get an update for dp out we wont need to worry about those files anymore

as for the specific linker error 1257.. thats an internal compiler error( i think, i couldnt find anything specific on it after a few mins of looking), meaning that its specific to your compiler and most likely because its trying to do someting that it cant, i would suggest checking and double checking all of your compiler and linker settings to make sure that they are set to compile your code so that it will work with GDK...

i dont use VS 2005 myself( i use the 2008 version ) so cant tell you the specifics for that version.. but i will attach the screenies of one of my solutions that uses physics successfully, compiler and linker options( just the ones that I changed to get it to run. ps. dont ignore those 3 libs(libcmtd, msvcrt, atls) in the linker input window unless you specifically need to, i did that when i was playing around getting it working using the sample project setups as a guide and forgot to put it bak lol)... these are for the visual c++ 2008 though so may not help you unless you know your way around your IDE.. pics in JPG format, in a ZIP file.. about 175k

I can also suggest that you have a look through the DarkPhysics and GDK forums aswell, i know that there have been a couple of people that have had small issues with installing it and have made similar posts. Good luck, Dark Physics is a great product I believe, and a great way to step into the world of using physics in computer games...

apologies for the long winded response but there are a number of variables as to why you could get an internal compiler code gen error simple calling dbPhyStart() .. just a function.. hope i have been of some help.

EDIT : sorry i didnt look closely at your snippet, the #pragma directive at the top of your main program file, try putting it at the top of the dp header file or just leaving it out and using your linker options( dont know if that will make a difference, i just didnt notice it before )

If it ain't broke.... DONT FIX IT !!!

Attachments

Login to view attachments
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 3rd Sep 2008 23:07
Thanks Mista Wilson,
I'll ask the question on DarkPhysics forum Dark Physics DarkGDK(C++) installation ??

Cheers,
-Try

Login to post a reply

Server time is: 2024-09-30 05:39:21
Your offset time is: 2024-09-30 05:39:21