R
R
RomkaChev2014-10-29 18:18:50
C++ / C#
RomkaChev, 2014-10-29 18:18:50

How to compile OSG library using MinGW on Windows?

I'm trying to compile a fork of the OSG library with a built-in osgjs plugin to convert 3d models to . osgjs format.
Pre-installed MinGW .
I build the project using CMake-gui.
After the build, I go to the folder with the build, launch the Git Bash console and type the command $ mingw32-make.
During compilation, the following error is thrown:

In file included from D:/osg-master/include/osg/BufferObject:18:0,
                 from D:/osg-master/include/osg/Image:17,
                 from D:/osg-master/include/osg/AudioStream:17,
                 from D:\osg-master\src\osg\AudioStream.cpp:14:
D:/osg-master/build/include/osg/GL:118:26: error: '__int64' does not name a type

         typedef          __int64 GLint64;
                          ^
D:/osg-master/build/include/osg/GL:119:34: error: expected initializer before 'GLuint64'
         typedef unsigned __int64 GLuint64;
                                  ^
src\osg\CMakeFiles\osg.dir\build.make:198: recipe for target 'src/osg/CMakeFiles/osg.dir/AudioStream.obj' failed
mingw32-make[2]: *** [src/osg/CMakeFiles/osg.dir/AudioStream.obj] Error 1
CMakeFiles\Makefile2:245: recipe for target 'src/osg/CMakeFiles/osg.dir/all' failed
mingw32-make[1]: *** [src/osg/CMakeFiles/osg.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

PS When you try to compile the original library , everything goes well.
PPS Windows 8.1, CMake 3.1.0-rc, gcc 4.8.1
Tell me what to do in this situation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lolshto, 2014-10-29
@Lol4t0

Make sure you are using the correct cmake generator . You need MSYS Makefiles. I do not know how in the GUI, but in the console
cmake -G "MSYS Makefiles"

D
DancingOnWater, 2014-10-30
@DancingOnWater

Surface googling showed. That __int64 is this type of 64-bit int in the Microsoft compiler and in gcc (and therefore in mingw) it is not. Most likely you have configured for VS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question