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

Linux Discussion :

Problème de configuration compilateur Kdevelop


Sujet :

Linux

  1. #1
    Membre du Club
    Inscrit en
    Février 2004
    Messages
    197
    Détails du profil
    Informations forums :
    Inscription : Février 2004
    Messages : 197
    Points : 58
    Points
    58
    Par défaut Problème de configuration compilateur Kdevelop
    Bonjour,
    J'essaie de compiler un petit prog C++ sous Kdevelop (linux Debian). Voici mon code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    #include <iostream>
    using namespace std;
    int main()
    {
    cout << "truc" ;
    return 0;
    }
    Voici ce que j'obtiens à la compilation :
    cd '/home/jerome/Dev/essai' && CC="i586-mingw32msvc-c" CCX="i586-mingw32msvc-c++" LD="i586-mingw32msvc-ld" "/home/jerome/Dev/essai/configure" && cd '/home/jerome/Dev/essai' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -j1
    Processus d'installation -c
    checking whether build environment is sane... yes
    checking whether make sets &(MAKE)... yes
    checking for working aclocal-1.4... found
    checking for working autoconf... found
    checking for working automake-1.4... found
    checking for working autoheader... found
    checking for working makeinfo... found
    checking for C++ compiler default output file name...
    configure: error: C++ compiler cannot create executables
    See 'config.log' for more details.
    *** Sortie avec l'état : 77 ***
    Une idée ?

  2. #2
    Membre éclairé Avatar de MatRem
    Profil pro
    Inscrit en
    Décembre 2002
    Messages
    750
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2002
    Messages : 750
    Points : 693
    Points
    693
    Par défaut
    Ton programme n'a pas de main.

    Tu peux ajouter une fin de ligne aprés l'affichage:
    Tu peux retourner la valeur symbolique EXIT_SUCCESS à la fin du main, c'est plus explicite et si ta plateforme change de valeur pour le retour de main réussi ça marche toujours.
    Il faut inclure <cstdlib>.

  3. #3
    Membre du Club
    Inscrit en
    Février 2004
    Messages
    197
    Détails du profil
    Informations forums :
    Inscription : Février 2004
    Messages : 197
    Points : 58
    Points
    58
    Par défaut
    Oui, en fait mon prog a bien un main, c'est que je l'ai mal recopié sur le forum. (je viens de corriger sur le post initial).
    Sinon je viens en partie de résoudre en partie mon problème, en installant mingw32 ;
    apt-get install mingw32
    Mais je suis à nouveau bloqué ! Voici le nouveau message d'erreur que j'obtiens (il y a un peu de progrès...) :
    cd '/home/jerome/Dev/essai' && CC="i586-mingw32msvc-c" CCX="i586-mingw32msvc-c++" LD="i586-mingw32msvc-ld" "/home/jerome/Dev/essai/configure" && cd '/home/jerome/Dev/essai' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -j1
    Processus d'installation -c
    checking whether build environment is sane... yes
    checking whether make sets &(MAKE)... yes
    checking for working aclocal-1.4... found
    checking for working autoconf... found
    checking for working automake-1.4... found
    checking for working autoheader... found
    checking for working makeinfo... found
    checking for C++ compiler default output file name... a.exe
    checking whether the C++ compiler works...
    configure: error: cannot run C++ compiled programs.
    If you meant to cross-compile, use '--host'.
    See 'config.log' for more details.
    *** Sortie avec l'état : 1 ***
    Et voici mon fichier config.log :
    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.

    It was created by configure, which was
    generated by GNU Autoconf 2.59. Invocation command line was

    $ /home/jerome/Dev/essai/configure

    ## --------- ##
    ## Platform. ##
    ## --------- ##

    hostname = debian
    uname -m = i686
    uname -r = 2.6.8-2-686
    uname -s = Linux
    uname -v = #1 Thu May 19 17:53:30 JST 2005

    /usr/bin/uname -p = unknown
    /bin/uname -X = unknown

    /bin/arch = i686
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    hostinfo = unknown
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown

    PATH: /usr/local/bin
    PATH: /usr/bin
    PATH: /bin
    PATH: /usr/bin/X11
    PATH: /usr/games


    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##

    configure:1540: checking for a BSD-compatible install
    configure:1595: result: /usr/bin/install -c
    configure:1606: checking whether build environment is sane
    configure:1649: result: yes
    configure:1664: checking whether make sets $(MAKE)
    configure:1684: result: yes
    configure:1716: checking for working aclocal-1.4
    configure:1723: result: found
    configure:1731: checking for working autoconf
    configure:1738: result: found
    configure:1746: checking for working automake-1.4
    configure:1753: result: found
    configure:1761: checking for working autoheader
    configure:1768: result: found
    configure:1776: checking for working makeinfo
    configure:1783: result: found
    configure:1893: checking for C++ compiler version
    configure:1896: i586-mingw32msvc-c++ --version </dev/null >&5
    i586-mingw32msvc-c++ (GCC) 3.4.2 (mingw-special)
    Copyright (C) 2004 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    configure:1899: $? = 0
    configure:1901: i586-mingw32msvc-c++ -v </dev/null >&5
    Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.2/specs
    Configured with: /home/ron/devel/debian/mingw32/mingw32-3.4.2.20040916.1/build_dir/src/gcc-3.4.2-20040916-1/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
    Thread model: win32
    gcc version 3.4.2 (mingw-special)
    configure:1904: $? = 0
    configure:1906: i586-mingw32msvc-c++ -V </dev/null >&5
    i586-mingw32msvc-c++: `-V' option must have argument
    configure:1909: $? = 1
    configure:1932: checking for C++ compiler default output file name
    configure:1935: i586-mingw32msvc-c++ conftest.cc >&5
    configure:1938: $? = 0
    configure:1984: result: a.exe
    configure:1989: checking whether the C++ compiler works
    configure:1995: ./a.exe
    /home/jerome/Dev/essai/configure: line 1: ./a.exe: cannot execute binary file
    configure:1998: $? = 126
    configure:2007: error: cannot run C++ compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.

    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##

    ac_cv_env_CC_set=set
    ac_cv_env_CC_value=i586-mingw32msvc-c
    ac_cv_env_CFLAGS_set=
    ac_cv_env_CFLAGS_value=
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_CXXCPP_set=
    ac_cv_env_CXXCPP_value=
    ac_cv_env_CXXFLAGS_set=
    ac_cv_env_CXXFLAGS_value=
    ac_cv_env_CXX_set=set
    ac_cv_env_CXX_value=i586-mingw32msvc-c++
    ac_cv_env_F77_set=
    ac_cv_env_F77_value=
    ac_cv_env_FFLAGS_set=
    ac_cv_env_FFLAGS_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_exeext=.exe
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_prog_make_make_set=yes

    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##

    ACLOCAL='aclocal-1.4'
    AR=''
    AUTOCONF='autoconf'
    AUTOHEADER='autoheader'
    AUTOMAKE='automake-1.4'
    CC='i586-mingw32msvc-c'
    CFLAGS=''
    CPP=''
    CPPFLAGS=''
    CXX='i586-mingw32msvc-c++'
    CXXCPP=''
    CXXFLAGS=''
    DEFS=''
    ECHO='echo'
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    EXEEXT=''
    F77=''
    FFLAGS=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    LDFLAGS=''
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LN_S=''
    LTLIBOBJS=''
    MAKEINFO='makeinfo'
    OBJEXT=''
    PACKAGE='essai'
    PACKAGE_BUGREPORT=''
    PACKAGE_NAME=''
    PACKAGE_STRING=''
    PACKAGE_TARNAME=''
    PACKAGE_VERSION=''
    PATH_SEPARATOR=':'
    RANLIB=''
    SET_MAKE=''
    SHELL='/bin/sh'
    STRIP=''
    VERSION='0.1'
    ac_ct_AR=''
    ac_ct_CC=''
    ac_ct_CXX=''
    ac_ct_F77=''
    ac_ct_RANLIB=''
    ac_ct_STRIP=''
    bindir='${exec_prefix}/bin'
    build=''
    build_alias=''
    build_cpu=''
    build_os=''
    build_vendor=''
    datadir='${prefix}/share'
    exec_prefix='NONE'
    host=''
    host_alias=''
    host_cpu=''
    host_os=''
    host_vendor=''
    includedir='${prefix}/include'
    infodir='${prefix}/info'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localstatedir='${prefix}/var'
    mandir='${prefix}/man'
    oldincludedir='/usr/include'
    prefix='NONE'
    program_transform_name='s,x,x,'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''

    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##

    #define PACKAGE "essai"
    #define PACKAGE_BUGREPORT ""
    #define PACKAGE_NAME ""
    #define PACKAGE_STRING ""
    #define PACKAGE_TARNAME ""
    #define PACKAGE_VERSION ""
    #define VERSION "0.1"

    configure: exit 1
    Une idée ??

  4. #4
    Candidat au Club
    Inscrit en
    Novembre 2007
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 4
    Points : 4
    Points
    4
    Par défaut
    Cette erreur est généré quand tu essaye de compiler un programme win32 sous linux donc un programme windows sous linux.
    Je sais pas si s'est ton cas.

Discussions similaires

  1. Réponses: 17
    Dernier message: 22/02/2009, 12h38
  2. Configuration de pspad pour compilateur ADA
    Par youyoune dans le forum Ada
    Réponses: 4
    Dernier message: 12/10/2008, 12h11
  3. Réponses: 3
    Dernier message: 01/03/2008, 16h00
  4. [Kdevelop] configure : exit 77
    Par COGAN dans le forum Linux
    Réponses: 3
    Dernier message: 09/11/2007, 11h52

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