Hello,
I am currently trying to build Bullet libraries as dlls, but without any luck.
I've tried checking USE_MSVC_RUNTIME_LIBRARY_DLL, but still ending up with .lib files.
I tried changing the Configuration type of the libraries in Bullet to Dynamic libraries, but when compiling I'm just receiving a lot of unresolved external symbols errors, and only succeeding in compiling HACD_MinsizeRel.dll and LinearMath_MinsizeRel.dll.
I have tried it with both VS2010 and VS2012.
The reason why I need the bullet libraries as dlls, is because I need to compile Bulletsharp as a dll, and if I use the .lib files from Bullet I'm only able to build Bulletsharp as a .lib file,
If it's not possible to compile bullet libraries I guess the only approach is to use __declspec(dllexport) in the bulletsharp files.
Compiling as DLLs?
-
- Posts: 72
- Joined: Wed Feb 24, 2010 9:49 pm
Re: Compiling as DLLs?
The effect of USE_MSVC_RUNTIME_LIBRARY_DLL is that in Configuration Properties -> C/C++ -> Code Generation, it sets the Runtime Library option to "Multi-threaded DLL" instead of "Multi-threaded". It does not mean that Bullet is compiled into a DLL. Instead, it produces .lib files that are linked to the DLL-specific C++ runtime library. BulletSharp needs Bullet to use the DLL runtime, because BulletSharp is a .dll file, but Bullet still needs to be compiled into .lib files.
That said, I think something's wrong with the USE_MSVC_RUNTIME_LIBRARY_DLL flag for VS2012 in CMake. This flag is only applied when you click Generate twice. Try that. It works fine for VS2010, so I suspect it's a bug in CMake.
That said, I think something's wrong with the USE_MSVC_RUNTIME_LIBRARY_DLL flag for VS2012 in CMake. This flag is only applied when you click Generate twice. Try that. It works fine for VS2010, so I suspect it's a bug in CMake.
-
- Posts: 2
- Joined: Thu Apr 25, 2013 7:46 am
Re: Compiling as DLLs?
Maybe that's what happened.
Anyways I started from scratch and managed Bulletsharp as a dll with using the .lib files from Bullet.
Don't really know what I did different
..
Anyways I started from scratch and managed Bulletsharp as a dll with using the .lib files from Bullet.
Don't really know what I did different
