Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Aug 30, 2014 7:38 pm 
Offline
User avatar

Joined: Wed Aug 20, 2014 9:26 pm
Posts: 10
Location: Chandigarh, India
I have an OpenGL application that I am coding in Visual Studio 2010 IDE. I am building my application for two CPU architectures, and they are x86 (i.e. Win32) and x64.

CMake creates Visual Studio projects for Win32 or Win64 (only one at a time)
Attachment:
bcpu.png
bcpu.png [ 21.92 KiB | Viewed 47 times ]


Following guide on this page : http://bulletphysics.org/mediawiki-1.5.8/index.php/Creating_a_project_from_scratch
I added the generated BulletDynamics, BulletCollision and LinearMath vc++ projects in my application's solution.

It works if my application has one CPU architecture.
But if I have multiple CPU architectures, as the case is, I cannot batch-build my application.

Is there a simple way to build BulletPhysics in visual studio 2010 for multiple CPU architectures ?

UPDATE :

I created VS solution for Win32 using CMake for BulletPhysics. Then I manually added x64 architecture for all the projects (BulletDynamics, BulletCollision, ...).
I can build the BulletPhysics solution alone, and .lib files are generated.

Now using the method provided on official wiki (add projects as dependency) does not seem to work with my solution.

Also linking the files in Linker input like this :
Attachment:
bvsconfig.png
bvsconfig.png [ 51.51 KiB | Viewed 46 times ]


and building gives me 4 error like these :

Code:
1>Win32_Window.obj : error LNK2019: unresolved external symbol "public: struct btWheelInfo & __cdecl btRaycastVehicle::addWheel(class btVector3 const &,class btVector3 const &,class btVector3 const &,float,float,class btRaycastVehicle::btVehicleTuning const &,bool)" (?addWheel@btRaycastVehicle@@QEAAAEAUbtWheelInfo@@AEBVbtVector3@@00MMAEBVbtVehicleTuning@1@_N@Z) referenced in function "void __cdecl initPhysics(void)" (?initPhysics@@YAXXZ)
1>Win32_Window.obj : error LNK2019: unresolved external symbol "public: void __cdecl btRaycastVehicle::setSteeringValue(float,int)" (?setSteeringValue@btRaycastVehicle@@QEAAXMH@Z) referenced in function "void __cdecl stepPhysics(void)" (?stepPhysics@@YAXXZ)
1>Win32_Window.obj : error LNK2019: unresolved external symbol "public: void __cdecl btRaycastVehicle::setBrake(float,int)" (?setBrake@btRaycastVehicle@@QEAAXMH@Z) referenced in function "void __cdecl stepPhysics(void)" (?stepPhysics@@YAXXZ)
1>Win32_Window.obj : error LNK2019: unresolved external symbol "public: void __cdecl btRaycastVehicle::applyEngineForce(float,int)" (?applyEngineForce@btRaycastVehicle@@QEAAXMH@Z) referenced in function "void __cdecl stepPhysics(void)" (?stepPhysics@@YAXXZ)
1>D:\Stuff\Visual C++\OpenGL series\5.3 - Bullet Physics on Vehicle Model\Win32_Window_with_OpenGL_context\x64\Debug\Win32_Window_with_OpenGL_context.exe : fatal error LNK1120: 4 unresolved externals
1>


Is there a way i can make this work easily ?


Top
 Profile  
 
PostPosted: Sun Aug 31, 2014 7:31 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3883
Location: California, USA
Use premake instead of cmake, then you will have 32bit and 64bit targets in the same visual studio solution.

Click on build3/vs2010.bat and open build3/vs2010/0MySolution.sln


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group