[osg-users] [build] Building OSG 3.4.0 with VS2009, Windows 7, minor issues (fixed)

Etienne de Sarrieu etienne.desarrieu at altran.com
Mon Feb 8 05:12:56 PST 2016


Hi,

I was trying to build OpenSceneGraph 3.4.0 with CMake 3.2.2, Visual Studio 2008 (MSC_VER=1500) on a windows 7 station.

I had following error :


Code:
43>l:\compil_osg\openscenegraph-3.4.0\src\osgplugins\osgjs\JSON_Objects(26) : error C2371: 'int8_t' : redefinition; different basic types
43>        L:\COMPIL_OSG\OpenSceneGraph-3.4.0\include\osg/Types(18) : see declaration of 'int8_t'



Which I fixed in ReaderWriterSTL.cpp :


Code:
#ifndef __OSG_TYPES
#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)

typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;

#else

#include <stdint.h>

#endif
#endif



First and last line of code were added in the quoted code.
I had to do quite the same fix in JSON_Objects header in order to terminate OSG build.

If this is could be due to a mistake in my configuration, please let me know, otherwise I wanted to share this to the community if you think this should be fixed in trunk.

Cheers,
Etienne

PS I can give more details if you need it.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66234#66234








More information about the osg-users mailing list