Jump to content
  • Advertisement
Sign in to follow this  
BlackWind

error in linking pyshx

This topic is 3567 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, altough i'm working with the pysh engine, i posted my question here because im sure this problem can be solved without knowing that engine. When i load the original PhysX solution, i DO can compile, link and run all the examples with no problem. But when i create my own solution (in vs2005), and copy EXACTLY the same from the first example (sample boxes), i get linker errors. For those who has work with the phsyx engine, i included all the neccesarry files. (include directories) C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\Foundation\include C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\Physics\include C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\Cooking\include C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\PhysXLoader\include C:\Program Files\AGEIA Technologies\SDK\v2.8.0\Graphics\include\win32 C:\Program Files\AGEIA Technologies\SDK\v2.8.0\Samples\SampleCommonCode\src (lib files) C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\lib\Win32\PhysXLoader.lib C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\lib\Win32\NxCooking.lib C:\Program Files\AGEIA Technologies\SDK\v2.8.0\SDKs\lib\Win32\NxCharacter.lib C:\Program Files\AGEIA Technologies\SDK\v2.8.0\Graphics\lib\win32\glut\glut32.lib (dll) i alse included the physx.dll Also, i have exactly the same configuration that the physx default project. The project compiles, but it throws me these 2 linking errors:
Error	1	error LNK2001: unresolved external symbol __imp__NxReleasePhysicsSDK	NxBoxes.obj	

Error	2	error LNK2001: unresolved external symbol __imp__NxCreatePhysicsSDK	NxBoxes.obj	
it is not recognizing this function:
// this one in  static bool InitNx()
gPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION, NULL, new ErrorStream(), desc, &errorCode);

// and this one in static void ExitNx()
NxReleasePhysicsSDK(gPhysicsSDK);


the first function is declared as follows in physxLoader.h NXPHYSXLOADERDLL_API NxPhysicsSDK* NX_CALL_CONV NxCreatePhysicsSDK(NxU32 sdkVersion, NxUserAllocator* allocator = NULL, NxUserOutputStream* outputStream = NULL, const NxPhysicsSDKDesc& desc = NxPhysicsSDKDesc(), NxSDKCreateError* errorCode=NULL); and this is the second: NXPHYSXLOADERDLL_API void NX_CALL_CONV NxReleasePhysicsSDK(NxPhysicsSDK* sdk); the code and the cofiguration, is exactly the same that the solution that comes with the physx engine. Why would my project has that linking error and theirs no? how can i solve it?

Share this post


Link to post
Share on other sites
Advertisement
well, i solved the problem. But i dont understand how it works.
I didnt notice, that in linker properties, in the command line, the physx default project had something like this:
/DEBUG PhysXLoader.lib


i added that path file to the lib folder in the vc directorie. Also i added that folder in the "additional library directories". And it didnt recognized it. Why?
why did i had to add /DEBUG PhysXLoader.lib to the command line if i already specified the path?

Share this post


Link to post
Share on other sites
"NXPHYSXLOADERDLL_API"
"__imp__NxReleasePhysicsSDK"

these conventions hint that you are trying to statically link a DLL. make sure your linker can find the .lib stub for the dll.

are you compiling physx in release mode, and your other stuff in debug mode?

Share this post


Link to post
Share on other sites
i was in debug, an also the pysx default project. We had exactly the samen code and configuration, except for the /DEBUG PhysXLoader.lib in the linker command line. I still dont understand why did i need that if i had added all the neccesarry directories.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!