Bonjour à tous,
Je galère depuis plus d'une semaine sur le fonctionnement de cmake avec Qt4, perl kdebindings etc. Bon, je m'explique.
Ne connaissant absolument rien à Qt, je souhaitais le tester à travers Perl. Je travail sous Windows Vista ou XP.
Pour ce faire, il existe un module Perl Alien::QtSmoke que je dois installer qui nécessite l'installation de certains packages et certaines compilations que je vais vous détailler.
Premièrement, il est demandé :
- D'avoir Perl, ce qui est évidemment mon cas (perl 5.10)
- Il faut avoir maintenant Qt4 d'installé. J'ai installé Qt SDK 4.5.5 (C:\Qt\2010.05)
- Il faut installer cmake. J'ai installé cmake-2.8.3-win32-x86 (ici)
Le module perl qui permet normalement d'installer et compiler smoke, kdebinding, etc fais ceci :
- Il télécharge kdebindings-4.5.5.tar.bz2
- Le décompresse dans un répertoire src
- Il crée un répertoire build dans le répertoire kdebindings-4.5.5.
Voici l'arborescence du répertoireJusqu'ici, pas de soucis. Le problème vient par la suite lorsqu'il lance le programme cmake.C:\Alien-QtSmoke-4.5.5
C:\Alien-QtSmoke-4.5.5\src
C:\Alien-QtSmoke-4.5.5\src\kdebindings-4.5.5
C:\Alien-QtSmoke-4.5.5\src\kdebindings-4.5.5\build
C:\Alien-QtSmoke-4.5.5\src\kdebindings-4.5.5\.......
...
C:\Alien-QtSmoke-4.5.5\lib\Alien\QtSmoke.pm
Le programme se met dans le répertoire build (C:\Alien-QtSmoke-4.5.5\src\kdebindings-4.5.5\build) puis lance la commande suivante :
Voilà si quelqu'un pouvait m'expliquer la commande, je ne serais pas contre. Mais cette commande génère le message d'erreurs suivant
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 cmake .. -DCMAKE_INSTALL_PREFIX=C:\Alien-QtSmoke-4.5.5\lib\Alien\QtSmoke -DENABLE_SMOKE=on -DENABLE_QTRUBY=off -DENABLE_QTWEBKIT_SMOKE=off -DENABLE_QTSCRIPT_SMOKE=off -DENABLE_QTUITOOLS_SMOKE=off -DENABLE_QTTEST_SMOKE=off -DENABLE_PHONON_SMOKE=off -DENABLE_QSCI_SM OKE=off -DENABLE_QWT_SMOKE=off -DENABLE_KDE_SMOKE=off -DENABLE_KDEVPLATFORM_SMOKE=off -DENABLE_KHTML_SMOKE=off -DENABLE_KTEXTEDITOR_SMOKE=off -DENABLE_SOLID_SMOKE=off -DENABLE_PLASMA_SMOKE=off -DENABLE_QTWEBKIT_RUBY=off -DENABLE_QTUITOOLS_RUBY=off -DENABLE_QTSCRIPT=off -DENABLE_QTTEST=off -DENABLE_PHONON_RUBY=off -DENABLE_QSCINTILLA_RUBY=off -DENABLE_QWT_RUBY=off -DENABLE_SOPRANO_RUBY=off -DENABLE_KDEVPLATFORM_RUBY=off -DENABLE_KORUNDUM_RUBY=off -DENABLE_KHTML_RUBY=off -DENABLE_KTEXTEDITOR_RUBY=off -DENABLE_SOLID_RUBY=off -DENABLE_KRO SSRUBY=off -DENABLE_PLASMA_RUBY=off -DENABLE_QIMAGEBLITZ_SMOKE=off -Wno-dev
Voici le contenu de mon path
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90 -- Building for: NMake Makefiles CMake Warning at CMakeLists.txt:1 (project): To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command line. This environment does not contain INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to work. -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Warning at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:28 (ENABLE_LANGUAGE): To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command line. This environment does not contain INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to work. Call Stack (most recent call first): C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:60 (INCLUDE) CMakeLists.txt:1 (project) CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Please set CMAKE_RC_COMPILER to a valid compiler path or name. -- Check for CL compiler version -- Check for CL compiler version - failed -- Check if this is a free VC compiler -- Check if this is a free VC compiler - yes -- Using FREE VC TOOLS, NO DEBUG available -- Check for working C compiler: cl CMake Warning at CMakeLists.txt:2 (PROJECT): To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command line. This environment does not contain INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to work. CMake Warning at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:28 (ENABLE_LANGUAGE): To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command line. This environment does not contain INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to work. Call Stack (most recent call first): C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:60 (INCLUDE) CMakeLists.txt:2 (PROJECT) CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:28 (ENABLE_LANGUAGE) C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:60 (INCLUDE) CMakeLists.txt:2 (PROJECT) CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage CMake Error: your C compiler: "cl" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name. CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Check for working C compiler: cl -- broken CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler "cl" is not able to compile a simple test program. It fails with the following output: CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:1 (project) CMake Error: your C compiler: "cl" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name. CMake Error: your CXX compiler: "cl" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name. -- Configuring incomplete, errors occurred!Ne comprenant pas pourquoi il ne trouve pas le compilateur cl, je me suis dit que la bonne idée serait d'ouvrir une console DOS Qt afin de disposer des variables d'environnement de Qt chargées. Mais cela ne change rien au problème. J'ai donc décidé d'installer Visual Studio C++ 2010 et j'ai ouvert la console DOC de MVSC++ 2010 pour lancer mon programme (commande cmake).
Code : Sélectionner tout - Visualiser dans une fenêtre à part C:\Program Files\ImageMagick-6.6.2-Q16;C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;c:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Subversion\bin;C:\Parrot-1.9.0\bin;C:\Program Files\Java\jdk1.6.0_17\bin;c:\www\php-5;c:\www\apache-2.2\bin;C:\www\mysql\bin;C:\Program Files\Smart Projects\IsoBuster;C:\gcc\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live\Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\CMake 2.8\bin
Mais maintenant, j'optiens ce message d'erreur :
Donc maintenant, il ne trouve pas Qt :-( !!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 -- The C compiler identification is MSVC -- The CXX compiler identification is MSVC -- Check for CL compiler version -- Check for CL compiler version - 1600 -- Check if this is a free VC compiler -- Check if this is a free VC compiler - no -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 10.0/V C/bin/cl.exe -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 10.0/V C/bin/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 10.0 /VC/bin/cl.exe -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 10.0 /VC/bin/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake: 1148 (MESSAGE): Qt qmake not found! Call Stack (most recent call first): generator/CMakeLists.txt:3 (find_package) -- Configuring incomplete, errors occurred!
J'ai donc rajouté dans mon PATH C:\Qt\2010.05\qt\bin;C:\Qt\2010.05\bin; et j'ai relancé mon programme, voici maintenant le message d'erreur :
Du coup, j'ai décidé d'installer Qt libraries 4.7.1 for Windows (VS 2008, 228 MB) et MVS2008 afin d'avoir un QT compatible Microsft Visual Studio C++ 2008. Voici maintenant le message d'erreur :-- The C compiler identification is MSVC
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1600
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 10.0/V
C/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 10.0/V
C/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 10.0
/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 10.0
/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake:
618 (MESSAGE):
It appears you're trying to use Visual Studio with Qt built by mingw.
Those compilers do not produce code compatible with each other.
Call Stack (most recent call first):
generator/CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
Je suis à court d'idées, quelqu'un peut il m'aider !!!-- Building for: NMake Makefiles
-- The C compiler identification is MSVC
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1500
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 9.0/VC
/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 9.0/VC
/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 9.0/
VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 9.0/
VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt-Version 4.7.1 (using C:/Qt/4.7.1/bin/qmake.exe)
CMake Error at generator/parser/CMakeLists.txt:41 (install):
install Library TARGETS given no DESTINATION!
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindKDE4.cmake
:58 (MESSAGE):
ERROR: Could not find KDE4 kde4-config
Call Stack (most recent call first):
CMakeLists.txt:9 (find_package)
-- Configuring incomplete, errors occurred!
Merci d'avance
Partager