Vs2015 Build failure - unicode problems
Posted: Wed Oct 18, 2017 9:22 pm
I've download bullet3-2.87.zip ready to use it in a new project, run build_visual_studio_without_pybullet_vr.bat, open the build3/vs2010/0_Bullet3Solution.sln in Visual Studio 2015 (Update 3).
If I just compile, I hit things like this:
10>..\..\examples\SharedMemory\b3PluginManager.cpp(117): error C2664: 'HMODULE LoadLibraryW(LPCWSTR)': cannot convert argument 1 from 'const char *' to 'LPCWSTR'
This is:
with
and that comes from
where UNICODE is defined implicitly.
If I change B3_DYNLIB_OPEN to explicitly use LoadLibraryA, I then hit:
in pathtools.h - as WIN32 is not defined.
I can get around this by just deleting the App_PhysicsServer_SharedMemory_VR project from the solution.
With these hacks the demo/test app runs so it's all fine (not interested in the missing project) - I'm just surprised I can't see anybody else mentioning this! Is there something weird about my setup? Apart from it being Windows of course
If I just compile, I hit things like this:
10>..\..\examples\SharedMemory\b3PluginManager.cpp(117): error C2664: 'HMODULE LoadLibraryW(LPCWSTR)': cannot convert argument 1 from 'const char *' to 'LPCWSTR'
This is:
Code: Select all
B3_DYNLIB_HANDLE pluginHandle = B3_DYNLIB_OPEN(pluginPath);
Code: Select all
#define B3_DYNLIB_OPEN LoadLibrary
Code: Select all
#ifdef UNICODE
#define LoadLibrary LoadLibraryW
#else
#define LoadLibrary LoadLibraryA
#endif // !UNICODE
If I change B3_DYNLIB_OPEN to explicitly use LoadLibraryA, I then hit:
Code: Select all
#warning "Unknown platform for PLATSUBDIR"
I can get around this by just deleting the App_PhysicsServer_SharedMemory_VR project from the solution.
With these hacks the demo/test app runs so it's all fine (not interested in the missing project) - I'm just surprised I can't see anybody else mentioning this! Is there something weird about my setup? Apart from it being Windows of course