IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Outils Discussion :

Qt4, Smoke, cmake, kdebindings et Perl


Sujet :

Outils

  1. #1
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 499 184
    Points
    499 184
    Par défaut Qt4, Smoke, cmake, kdebindings et Perl
    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épertoire
    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
    Jusqu'ici, pas de soucis. Le problème vient par la suite lorsqu'il lance le programme cmake.
    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 :

    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
    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
    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!
    Voici le contenu de mon path
    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
    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).

    Mais maintenant, j'optiens ce message d'erreur :

    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!
    Donc maintenant, il ne trouve pas Qt :-( !!

    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 :
    -- 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!
    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 :
    -- 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!
    Je suis à court d'idées, quelqu'un peut il m'aider !!!

    Merci d'avance

  2. #2
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 499 184
    Points
    499 184
    Par défaut
    En utilisant un CMakeLists allégé :
    Code CMakeLists .txt : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    project(PerlQt4)
     
    # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
    set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
     
    FIND_PACKAGE(Perl REQUIRED)
    FIND_PACKAGE (Qt4 REQUIRED)
     
    add_subdirectory(generator)
     
    # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules )
     
    add_subdirectory(smoke)
    add_subdirectory(perl)

    J'obtiens ceci :
    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
    -- 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
    -- Found Perl: C:/Perl/bin/perl.exe
    -- 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 smoke/qtcore/QtGuess.txt:135 (list):
      list sub-command REMOVE_ITEM requires two or more arguments.
    Call Stack (most recent call first):
      smoke/qtcore/CMakeLists.txt:14 (include)
     
     
    -- Checking how Qt was built...
    -- Threshold is set to 10
    CMake Error at smoke/qtcore/QtGuess.txt:141 (include):
      include could not find load file:
     
        HandleImportedTargetsInCMakeRequiredLibraries
    Call Stack (most recent call first):
      smoke/qtcore/CMakeLists.txt:14 (include)
     
     
    CMake Error at smoke/qtcore/QtGuess.txt:144 (HANDLE_IMPORTED_TARGETS_IN_CMAKE_RE
    QUIRED_LIBRARIES):
      Unknown CMake command
      "HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES".
    Call Stack (most recent call first):
      smoke/qtcore/CMakeLists.txt:14 (include)
     
     
    -- Configuring incomplete, errors occurred!

  3. #3
    yan
    yan est déconnecté
    Rédacteur
    Avatar de yan
    Homme Profil pro
    Ingénieur expert
    Inscrit en
    Mars 2004
    Messages
    10 033
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Ingénieur expert
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2004
    Messages : 10 033
    Points : 13 968
    Points
    13 968
    Par défaut
    SAlut.
    Tu as pu avancer?

    Pour cmake, il faut récupérer les définitions dans kdelib ou un truc comme cela.

  4. #4
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 499 184
    Points
    499 184
    Par défaut
    non, je n'ai toujours pas avancé.

Discussions similaires

  1. Qt4 + CMake
    Par AuraHxC dans le forum Systèmes de compilation
    Réponses: 10
    Dernier message: 14/01/2010, 13h47
  2. [langage] Comparer Perl avec d'autres langages comme C ?
    Par Anonymous dans le forum Langage
    Réponses: 3
    Dernier message: 10/08/2002, 23h52
  3. [réseaux] Bench en Perl pour avoir le débit entre 2 pc
    Par Frich dans le forum Programmation et administration système
    Réponses: 4
    Dernier message: 22/05/2002, 17h22
  4. [web] Cherche un conseil pour un livre perl-tk
    Par Anonymous dans le forum Interfaces Graphiques
    Réponses: 2
    Dernier message: 29/04/2002, 15h35

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo