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

C Discussion :

Conflit de librairies


Sujet :

C

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2005
    Messages
    241
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2005
    Messages : 241
    Par défaut Conflit de librairies
    Bonjour,
    Quelqu'un sait il ce que je doit faire après un tel conflit:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _longjmp already defined in LIBC.lib(longjmp.obj)
    LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
    STN_encoder.exe : fatal error LNK1169: one or more multiply defined symbols found
    Merci

  2. #2
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Répertorier les librairies portant le même nom de méthode et ne faire le lien qu'à une seule des 2.

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Je me suis mal exprimé : Répertorier les librairies POSSEDANT les même noms de fonctions et ne faire le lien qu'à une seule des 2 librairies.

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2005
    Messages
    241
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2005
    Messages : 241
    Par défaut
    Merci,
    A parrament il s'agit de MSVCRT.lib mais je ne la trouve pas dans les librairies incluses au projet (sous visual: settings->link.
    Sais tu où je peux l'enlever?

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Tu compiles en single thread ton projet ou alors tu as forcé le lien vers LIBC.LIB ?

  6. #6
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2005
    Messages
    241
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2005
    Messages : 241
    Par défaut
    Je ne comprend pas.
    J'ai rien forcé.
    J'ai inclu une librairie en donnant le chemin d'accès.

  7. #7
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Normalement, tu ne peux linker que sur une seule de ces librairies : LIBC.lib, LIBCMT.LIB et MSVCRT.LIB.
    Si je me souviens bien, MSVCRT.LIB est utilisé pour les projets avec C++ (mono et multithread) et LIBC.lib pour les projets C monothread et LIBCMT.lib pour les projets C multithread.
    Donc tu ne devrais pas avoir deux de ces dll dans le link. Je vais aller voir sur msdn.

  8. #8
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Voilà, j'ai trouvé des infos, n'ayant pas ton dsp, je ne peux pas trop savoir d'où ça vient le fait que tu aies le lien vers les 2 lib, j'espère que ça t'aidera :
    http://support.microsoft.com/default...b;en-us;154753

  9. #9
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2005
    Messages
    241
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2005
    Messages : 241
    Par défaut
    merci

  10. #10
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2005
    Messages
    241
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2005
    Messages : 241
    Par défaut
    Le pb je crois est que j'ai inclu dans un code C du code C++ (avec matlab add-in) Donc ça créer des conflits. Voici ce que me dit le builder:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    Linking...
    fft_matlabc.obj : error LNK2005: __main_info already defined in shift_matlab.obj
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _printf already defined in LIBC.lib(printf.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _longjmp already defined in LIBC.lib(longjmp.obj)
    LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
    STN_encoder.exe : fatal error LNK1169: one or more multiply defined symbols found
    Error executing link.exe.
    Donc je comprend qu'il faut que je choisisse entre MSVCRT.lib et LIBC.lib
    Si j'en exclue donc l'une ou l'autre, il me manque à chaque fois apres compile des fonctions de la librairie exclue. Que dois je faire? Que veut dire "use /NODEFAULTLIB:library", où dois je entrer cette commande?

    Merci

  11. #11
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Si j'en exclue donc l'une ou l'autre, il me manque à chaque fois apres compile des fonctions de la librairie exclue. Que dois je faire? Que veut dire "use /NODEFAULTLIB:library", où dois je entrer cette commande?
    j'ai inclu dans un code C du code C++
    J'avoue avoir déjà inclu du code C dans du C++ mais jamais l'inverse ; je ne suis pas sûr que ça marche. Je dirai même que cela ne peut pas marcher.

  12. #12
    Membre éclairé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    731
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 731
    Par défaut
    Si j'en exclue donc l'une ou l'autre, il me manque à chaque fois apres compile des fonctions de la librairie exclue. Que dois je faire? Que veut dire "use /NODEFAULTLIB:library", où dois je entrer cette commande?
    Cela signifie que tu linkes avec des librairies incompatibles. Ca n'est pas très grave. Pour faire disparaître le Warning, il faut aller dans setting/Link/project option et ajouter les commandes /NODEFAULTLIB

  13. #13
    Nouveau candidat au Club
    Profil pro
    Inscrit en
    Août 2008
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Août 2008
    Messages : 3
    Par défaut Même Probleme :(
    Bonjour ,

    Voila, j'ai le meme probleme avec vs 6 c++ quand je compile j'ai cela:

    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
    Linking...
    LINK : warning LNK4075: ignoring /INCREMENTAL due to /DEBUGTYPE specification
    LIBC.lib(crt0dat.obj) : error LNK2005: __cinit already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __cexit already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __C_Exit_Done already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __C_Termination_Done already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __exitflag already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __wpgmptr already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __pgmptr already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: ___winitenv already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __wenviron already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: ___initenv already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __environ already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: ___wargv already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: ___argv already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: ___argc already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __winminor already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __winmajor already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __winver already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __osver already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : error LNK2005: __umaskval already defined in LIBCMTD.lib(crt0dat.obj)
    LIBC.lib(crt0dat.obj) : warning LNK4006: __cinit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: _exit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __exit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __cexit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __c_exit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __C_Exit_Done already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __C_Termination_Done already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __exitflag already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __wpgmptr already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __pgmptr already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: ___winitenv already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __wenviron already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: ___initenv already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __environ already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: ___wargv already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: ___argv already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: ___argc already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __winminor already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __winmajor already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __winver already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __osver already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
    LIBC.lib(crt0dat.obj) : warning LNK4006: __umaskval already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
       Creating library Debug/Toto.lib and object Debug/Toto.exp
    LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
    Debug/Toto.exe : fatal error LNK1169: one or more multiply defined symbols found
    Que dois§je faire svp (je suis encore debutant en programmation) ??

  14. #14
    Expert confirmé

    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    10 610
    Détails du profil
    Informations personnelles :
    Âge : 67
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 10 610
    Billets dans le blog
    2
    Par défaut
    quel est ton ordre de link ??

    Peux-tu nous donner la/les lignes de link ?

  15. #15
    Nouveau candidat au Club
    Profil pro
    Inscrit en
    Août 2008
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Août 2008
    Messages : 3
    Par défaut
    Dans Library file j'ai :
    C:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\LIB
    C:\Program Files (x86)\Microsoft Visual Studio\VC98\LIB

    Dans Include file j'ai :
    C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE
    C:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\INCLUDE
    C:\Program Files (x86)\Microsoft Visual Studio\VC98\ATL\INCLUDE

    ??

  16. #16
    Expert confirmé

    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    10 610
    Détails du profil
    Informations personnelles :
    Âge : 67
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 10 610
    Billets dans le blog
    2
    Par défaut
    Désolé, mais

    1) ne m'envoies pas de mess en privé, je ne répondrais pas . Le forum est fait pour ça

    2) je ne connais VC..

    Mais essaye d'inverser les lignes dans Library Files

  17. #17
    Nouveau candidat au Club
    Profil pro
    Inscrit en
    Août 2008
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Août 2008
    Messages : 3
    Par défaut bug
    Ok merci pour ta réponse rapide.

    Pour ce qui est de mon probleme ,j'ai retirer tous se qui été MFC Dans Library et include file j'ai :

    C:\Program Files (x86)\Microsoft Visual Studio\VC98\LIB

    Dans Include file j'ai tous delete :

    J'ai la meme erreur Help help help plz

Discussions similaires

  1. Conflit de librairie au déploiement de plusieurs webapp
    Par syella34 dans le forum Wildfly/JBoss
    Réponses: 0
    Dernier message: 21/07/2011, 08h58
  2. conflit de librairie
    Par pasqual dans le forum Visual C++
    Réponses: 4
    Dernier message: 06/11/2008, 14h18
  3. Débutant : Installation Conflit de librairie
    Par killerti dans le forum PostgreSQL
    Réponses: 3
    Dernier message: 05/07/2007, 16h03
  4. Conflit de librairie...
    Par panda_fonfon dans le forum MFC
    Réponses: 2
    Dernier message: 22/04/2006, 12h51
  5. conflit de librairies
    Par petdelascar dans le forum C
    Réponses: 8
    Dernier message: 10/03/2006, 22h13

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