1
Général / Re : CrossCompilation Windows sous Linux
« le: Juin 25, 2014, 11:41:56 am »
Bon, je vais remonter mon vieux sujet mais je suis arrivé à résoudre les problèmes durant la configuration cmake.
Maintenant c'est lors de la compilation que le compilateur ne trouve pas GL/glew.h
Voici ce que j'ai tapé pour cmake
Et voici mon fichier qui défini la toolchain de Windows sous linux
Si quelqu'un a une idée pourquoi le compilateur ne trouve pas GL/glew.h, alors que j'ai bien défini lors de la configuration où se situer les librairies Windows.
Maintenant c'est lors de la compilation que le compilateur ne trouve pas GL/glew.h
Citer
[ 56%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.obj
In file included from /var/lib/jenkins/workspace/SFML/src/SFML/Graphics/GLCheck.hpp:32,
from /var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:29:
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/GLExtensions.hpp:77:25: error: GL/glew.h: Aucun fichier ou dossier de ce type
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:35:22: error: ft2build.h: Aucun fichier ou dossier de ce type
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:36:10: error: #include expects "FILENAME" or <FILENAME>
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:37:10: error: #include expects "FILENAME" or <FILENAME>
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:38:10: error: #include expects "FILENAME" or <FILENAME>
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:39:10: error: #include expects "FILENAME" or <FILENAME>
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:47: error: ‘FT_Stream’ was not declared in this scope
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:47: error: expected primary-expression before ‘unsigned’
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:47: error: expected primary-expression before ‘unsigned’
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:47: error: expected primary-expression before ‘unsigned’
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:47: error: initializer expression list treated as compound expression
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:48: error: expected ‘,’ or ‘;’ before ‘{’ token
/var/lib/jenkins/workspace/SFML/src/SFML/Graphics/Font.cpp:718: error: expected `}' at end of input
make[2]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.obj] Erreur 1
make[1]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Erreur 2
make: *** [all] Erreur 2
Voici ce que j'ai tapé pour cmake
Citer
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/etc/toolchains/windows.cmake -DGLEW_LIBRARY=./extlibs/libs-mingw/x86/lib/libglew.a -DGLEW_INCLUDE_PATH=./extlibs/headers -DJPEG_LIBRARY=./extlibs/libs-mingw/x86/libjpeg.a -DJPEG_INCLUDE_DIR=./extlibs/headers/jpeg -DOPENAL_LIBRARY=./extlibs/libs-mingw/x86/libopenal32.a -DOPENAL_INCLUDE_DIR=./extlibs/headers/AL -DFREETYPE_LIBRARY=./extlibs/libs-mingw/x86/libfreetype.a -DFREETYPE_INCLUDE_DIRS=./extlibs/headers/libfreetype/windows -DSNDFILE_LIBRARY=./extlibs/libs-mingw/x86/libsndfile.a -DSNDFILE_INCLUDE_DIR=./extlibs/headers/libsndfile/windows
Et voici mon fichier qui défini la toolchain de Windows sous linux
Citer
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Si quelqu'un a une idée pourquoi le compilateur ne trouve pas GL/glew.h, alors que j'ai bien défini lors de la configuration où se situer les librairies Windows.