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

Visual C++ Discussion :

Erreur de link sur setw().


Sujet :

Visual C++

  1. #1
    Membre expérimenté Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Par défaut Erreur de link sur setw().
    Bonjour,
    j'ai le code suivant (VS2005, SDK de Mars 2006) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
        std::ostringstream ossPoidsReel;
        ossPoidsReel << std::setiosflags(std::ios::fixed | std::ios::showpoint) 
                     << std::setprecision(2)
                     << m_dPoidsReel * 1000;
    En debug, la compilation est OK, alors qu'en release, j'ai l'erreur suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    msvcprt.lib(MSVCP80.dll) : error LNK2005: "struct std::_Smanip<int> __cdecl std::setw(int)" (?setw@std@@YA?AU?$_Smanip@H@1@H@Z) already defined in libcpmt.lib(iomanip.obj)
    fatal error LNK1169: one or more multiply defined symbols found
    autre chose, ca arrive uniquement en release, en debug, c bon !

    je ne comprends pas pkoi ???
    une idée ?

  2. #2
    Expert éminent
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 394
    Par défaut
    Pour des raisons qui me sont inconnues, il semblerait que tu sois lié à la fois à la CppRT statique multithreadée (libcpmt.lib) et à la CppRT dynamique (msvcprt.lib/MSVCP80.dll).

    Alors forcément, il y a conflit...
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  3. #3
    Membre expérimenté Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Par défaut
    Pour des raisons qui me sont inconnues
    +1 !....

    quelle belle m....e ce truc !

    c'est un projet qui utilise une lib (MySQL++ pour ne pas la citer). Est ce que le mode de compilation de cette lib peut avoir un impact ?

  4. #4
    Expert éminent
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 394
    Par défaut
    oui.
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  5. #5
    Membre expérimenté Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Par défaut
    ok, c pas coool, mais je vais voir tout ca ...

    merci !

  6. #6
    Membre expérimenté Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Par défaut
    bon, j'ai avancé (a peine). je me retrouve avec des unrevoled symbols :

    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
     
    BtnST.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
    atls.lib(atltrace.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
    BtnST.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    ConfigAdmin.obj : error LNK2001: unresolved external symbol __imp__atoi
    ConfigAdmin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
    ConfigAdmin.obj : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo
    ConfigAdmin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(class std::exception const &)" (__imp_??0exception@std@@QAE@ABV01@@Z)
    ConfigAdmin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual char const * __thiscall std::exception::what(void)const " (__imp_?what@exception@std@@UBEPBDXZ)
    ConfigAdmin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::exception::~exception(void)" (__imp_??1exception@std@@UAE@XZ)
    ConfigAdmin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
    DialogAdmin.obj : error LNK2001: unresolved external symbol __purecall
    DialogAdmin.obj : error LNK2001: unresolved external symbol __imp__strtol
    DialogAdmin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall type_info::name(struct __type_info_node *)const " (__imp_?name@type_info@@QBEPBDPAU__type_info_node@@@Z)
    DialogAdmin.obj : error LNK2001: unresolved external symbol "struct __type_info_node __type_info_root_node" (?__type_info_root_node@@3U__type_info_node@@A)
    DialogAdmin.obj : error LNK2001: unresolved external symbol __imp__memmove_s
    DialogCtrlIndigo.obj : error LNK2001: unresolved external symbol __imp__strtod
    DialogCtrlTirage.obj : error LNK2001: unresolved external symbol __imp__tolower
    DialogCtrlTirage.obj : error LNK2001: unresolved external symbol __imp__atof
    FontEx.obj : error LNK2001: unresolved external symbol __imp__memmove
    FontEx.obj : error LNK2001: unresolved external symbol __imp__strcpy_s
    Mygale.obj : error LNK2001: unresolved external symbol _atexit
    Mygale.obj : error LNK2001: unresolved external symbol __imp__sprintf_s
    Mygale.obj : error LNK2001: unresolved external symbol __imp__toupper
    Mygale.obj : error LNK2001: unresolved external symbol __imp__strtoul
    MygaleDlg.obj : error LNK2001: unresolved external symbol __imp___time64
    MygaleDlg.obj : error LNK2001: unresolved external symbol __imp__strstr
    MyPrint.obj : error LNK2001: unresolved external symbol __imp__sscanf_s
    MyPrint.obj : error LNK2001: unresolved external symbol __imp__strftime
    MyPrint.obj : error LNK2001: unresolved external symbol __imp___localtime64_s
    ShadeButtonST.obj : error LNK2001: unresolved external symbol __imp__rand
    stdafx.obj : error LNK2001: unresolved external symbol __imp__free
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp__free
    stdafx.obj : error LNK2001: unresolved external symbol __imp__calloc
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp__calloc
    stdafx.obj : error LNK2001: unresolved external symbol __imp__malloc
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp__malloc
    stdafx.obj : error LNK2001: unresolved external symbol __imp___resetstkoflw
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp___resetstkoflw
    stdafx.obj : error LNK2001: unresolved external symbol __imp___recalloc
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp___recalloc
    stdafx.obj : error LNK2001: unresolved external symbol __imp__wcscpy_s
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp__wcscpy_s
    Tools.obj : error LNK2001: unresolved external symbol __imp__strcat_s
    LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
    mysqlpp.lib(query.obj) : error LNK2001: unresolved external symbol __imp__isalnum
    mysqlpp.lib(query.obj) : error LNK2001: unresolved external symbol __imp__isdigit
    mysqlpp.lib(type_info.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall type_info::before(class type_info const &)const " (__imp_?before@type_info@@QBEHABV1@@Z)
    mysqlpp.lib(type_info.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall type_info::operator==(class type_info const &)const " (__imp_??8type_info@@QBE_NABV0@@Z)
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __SEH_epilog4_GS
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __except_handler4
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __SEH_prolog4_GS
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __alloca_probe_16
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z)
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __EH_epilog3_GS
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __EH_prolog3_GS
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp__wcslen
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol ___security_cookie
    atls.lib(atltrace.obj) : error LNK2001: unresolved external symbol ___security_cookie
    mfcs80.lib(stdafx.obj) : error LNK2001: unresolved external symbol __EH_prolog3
    G:\DevRoot\Photoways\Mygale\Mygale\Release\Mygale.exe : fatal error LNK1120: 52 unresolved externals
    c vraiment pas glop cette histoire.
    toutes les configs utilisent les memes options de compilation (MTd ou MT)...
    c'est quoi toutes ces erreurs ? qu'est ce que la lib sécurisée vient faire la ?

  7. #7
    Expert éminent
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 394
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 394
    Par défaut
    Je ne sais pas...
    Les fonctions free() etc, sont dans toutes les versions de la CRT... Et là, il n'en trouve aucune...
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  8. #8
    Membre expérimenté Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Par défaut
    ce qui m'intrigait, c'etait les fonctions de mfc80s...

    j'ai regénéré un projet pour ma lib, puis remis les memes propriétés entre
    le debug et le release pour le programme, et ca va mieux.

    il ne me reste qu'une fonction de la lib qu'il ne trouve pas qd il link,
    mais je vais tacher de m'en tirer !

    merci a toi ! @++

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 2
    Dernier message: 28/12/2006, 16h54
  2. [Erreur au link sur GTKmm] buttonbox.cpp
    Par Jean_Benoit dans le forum Code::Blocks
    Réponses: 1
    Dernier message: 25/10/2006, 08h48
  3. erreur de link(age) g++
    Par corwin dans le forum Autres éditeurs
    Réponses: 1
    Dernier message: 05/05/2004, 11h33
  4. [wxWindows] Erreur de link pour ODBC
    Par ovh dans le forum wxWidgets
    Réponses: 3
    Dernier message: 28/01/2004, 15h38
  5. DirectDrawCreate erreur de link
    Par Ing_Ben dans le forum DirectX
    Réponses: 1
    Dernier message: 01/12/2002, 18h46

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