yoshinoToylogic / bulletsharp

Automatically exported from code.google.com/p/bulletsharp
MIT License
0 stars 0 forks source link

Patch for Visual Studio 2012 solution and project #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

as I'm currently trying to get Bullet, BulletSharp and XNA 4.0 compiled with 
Visual Studio 2012 Express for Windows Desktop I encountered some issues with 
your provided VS11 solution.

- Some file paths were wrong (e.g. "..\bullet..." instead of "..\..\bullet...") 
as the VS11 solution is in an extra folder.

- A missing build configuration for XNA 4.0

- "TargetFrameworkVersion" is 4.5 as default. But I added some conditions so 
that XNA 4.0 is using the .Net 4.0 framework and XNA 3.1 the .Net 3.5 framework.

- Removed the "/NODEFAULTLIB:msvcprt(d)" linker flags. Otherwise I'm getting 
some LNK2028, LNK2019 and LNK2001 errors. I'm not sure if this is the right 
solution for this problem, but it worked for me.

Greetings

Hagn

PS: I attached you the final version and the changes I made.

Original issue reported on code.google.com by Hagn99@gmail.com on 19 Sep 2012 at 11:51

Attachments:

GoogleCodeExporter commented 8 years ago
I'm having a few issues with this build myself. Did you have to specify the 
Multi-threaded DLL (/MD) runtime library (USE_MSVC_RUNTIME_LIBRARY_DLL in 
CMake) when compiling Bullet? Previous versions of Visual Studio seemed to 
treat this mismatch as a warning instead of an error.

Thanks for the patch! Added in r416.

Original comment by andres.traks on 20 Sep 2012 at 9:55

GoogleCodeExporter commented 8 years ago
I also had the /MD issue, but only when I tried to convert the 2010 project to 
a 2012 project. The V11 project provided by yourself worked fine. But I think 
"USE_MSVC_RUNTIME_LIBRARY_DLL" is the proper solution for this as the /MT and 
/CLR flags cannot work together.

Original comment by Hagn99@gmail.com on 20 Sep 2012 at 10:50

GoogleCodeExporter commented 8 years ago
So to finally recap, USE_MSVC_RUNTIME_LIBRARY_DLL is necessary as both Bullet 
and BulletSharp need to have /MD.

There is still a bug in CMake where USE_MSVC_RUNTIME_LIBRARY_DLL becomes 
deselected in some cases and Bullet is then built with /MT.

"/NODEFAULTLIB:msvcprt" removed the /MD library that BulletSharp links to, so 
both would be linked with /MT. This fixed the build (for VS2010 at least), but 
the runtime library was wrong. So using /NODEFAULTLIB is incorrect.

Thanks again!

Original comment by andres.traks on 7 May 2014 at 9:10