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 :

[Visual C++] Mélanger du C avec du C++ et enrober le tout de sauce windows


Sujet :

C++

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Inscrit en
    Septembre 2006
    Messages
    110
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 110
    Par défaut [Visual C++] Mélanger du C avec du C++ et enrober le tout de sauce windows
    Bonjour,

    Je suis en train de faire une DLL multithreaded sous Visual C++ 6. Je dispose d'un squelette en C++ pour la génération de cette DLL avec les méthodes à implémenter. Les méthodes à implémenter font appel à du code pur C.
    Alors je fais la soupe avec C et C++, et le linkage est un vrai calvert ! J'ai plein d'erreur d'importation, j'ai mis du
    [cpp]
    #ifdef __cplusplus
    extern "C" {
    #endif
    //mes includes
    #ifdef __cplusplus
    }
    #endif[/cpp]

    un peu partout, rien marche et ça change jamais rien.

    [fixed]--------------------Configuration: TiersdeConfiance - Win32 Release--------------------
    Compiling...
    Constant.cpp
    Log.cpp
    Session.cpp
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(28) : warning C4273: 'fread' : inconsistent dll linkage. dllexport assumed.
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(29) : warning C4273: 'fwrite' : inconsistent dll linkage. dllexport assumed.
    tedetisEnvelop.cpp
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(28) : warning C4273: 'fread' : inconsistent dll linkage. dllexport assumed.
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(29) : warning C4273: 'fwrite' : inconsistent dll linkage. dllexport assumed.
    tedetisSession.cpp
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(28) : warning C4273: 'fread' : inconsistent dll linkage. dllexport assumed.
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(29) : warning C4273: 'fwrite' : inconsistent dll linkage. dllexport assumed.
    TiersdeConfianceAuto.cpp
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(28) : warning C4273: 'fread' : inconsistent dll linkage. dllexport assumed.
    C:\TEDETIS\LIBCURL-7.15.1-MSVC-WIN32-SSL-0.9.8A-ZLIB-1.2.3\INCLUDE\curl/stdcheaders.h(29) : warning C4273: 'fwrite' : inconsistent dll linkage. dllexport assumed.
    Generating Code...
    Linking...
    Creating library Release/TiersdeConfiance.lib and object Release/TiersdeConfiance.exp
    Constant.obj : error LNK2001: unresolved external symbol __imp__fclose
    Log.obj : error LNK2001: unresolved external symbol __imp__fclose
    tedetisSession.obj : error LNK2001: unresolved external symbol __imp__fclose
    Constant.obj : error LNK2001: unresolved external symbol __imp__fgets
    Constant.obj : error LNK2001: unresolved external symbol __imp__fopen
    Log.obj : error LNK2001: unresolved external symbol __imp__fopen
    tedetisSession.obj : error LNK2001: unresolved external symbol __imp__fopen
    Constant.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
    Log.obj : error LNK2001: unresolved external symbol __imp__fprintf
    tedetisSession.obj : error LNK2001: unresolved external symbol __imp__fprintf
    Log.obj : error LNK2001: unresolved external symbol __imp__ctime
    Log.obj : error LNK2001: unresolved external symbol __imp___ftime
    Session.obj : error LNK2001: unresolved external symbol __imp__free
    tedetisEnvelop.obj : error LNK2001: unresolved external symbol __imp__free
    tedetisSession.obj : error LNK2001: unresolved external symbol __imp__free
    Session.obj : error LNK2001: unresolved external symbol __imp__malloc
    tedetisEnvelop.obj : error LNK2001: unresolved external symbol __imp__malloc
    tedetisSession.obj : error LNK2001: unresolved external symbol __imp__malloc
    Session.obj : error LNK2001: unresolved external symbol __imp___itoa
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol __imp___itoa
    Session.obj : error LNK2001: unresolved external symbol __imp__calloc
    Session.obj : error LNK2001: unresolved external symbol __imp__atoi
    tedetisEnvelop.obj : error LNK2001: unresolved external symbol __imp__atoi
    tedetisEnvelop.obj : error LNK2001: unresolved external symbol __imp__stat
    OLDNAMES.lib(stat.obi) : error LNK2001: unresolved external symbol __imp__stat
    tedetisEnvelop.obj : error LNK2001: unresolved external symbol __imp__strtok
    tedetisEnvelop.obj : error LNK2001: unresolved external symbol __imp__sprintf
    tedetisSession.obj : error LNK2001: unresolved external symbol __imp___iob
    tedetisSession.obj : error LNK2001: unresolved external symbol __chkstk
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_MSGMAP const CWinApp::messageMap" (__imp_?messageMap@CWinApp@@1UAFX_MSGMAP@@B)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWinApp::WinHelpA(unsigned long,unsigned int)" (?WinHelpA@CWinApp@@UAEXKI@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::OnDDECommand(char *)" (?OnDDECommand@CWinApp@@UAEHPAD@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWinApp:oWaitCursor(int)" (?DoWaitCursor@CWinApp@@UAEXH@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp:oMessageBox(char const *,unsigned int,unsigned int)" (?DoMessageBox@CWinApp@@UAEHPBDII@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::SaveAllModified(void)" (?SaveAllModified@CWinApp@@UAEHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::InitApplication(void)" (?InitApplication@CWinApp@@UAEHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWinApp::AddToRecentFileList(char const *)" (?AddToRecentFileList@CWinApp@@UAEXPBD@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual class CDocument * __thiscall CWinApp::OpenDocumentFile(char const *)" (?OpenDocumentFile@CWinApp@@UAEPAVCDocument@@PBD@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWinThread:elete(void)" (?Delete@CWinThread@@UAEXXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual class CWnd * __thiscall CWinThread::GetMainWnd(void)" (?GetMainWnd@CWinThread@@UAEPAVCWnd@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinThread:rocessMessageFilter(int,struct tagMSG *)" (?ProcessMessageFilter@CWinThread@@UAEHHPAUtagMSG@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp:rocessWndProcException(class CException *,struct tagMSG const *)" (?ProcessWndProcException@CWinApp@@UAEJPAVCException@@PBUtagMSG@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::ExitInstance(void)" (?ExitInstance@CWinApp@@UAEHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinThread::IsIdleMessage(struct tagMSG *)" (?IsIdleMessage@CWinThread@@UAEHPAUtagMSG@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::OnIdle(long)" (?OnIdle@CWinApp@@UAEHJ@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinThread:umpMessage(void)" (?PumpMessage@CWinThread@@UAEHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinThread:reTranslateMessage(struct tagMSG *)" (?PreTranslateMessage@CWinThread@@UAEHPAUtagMSG@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::Run(void)" (?Run@CWinApp@@UAEHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual struct IConnectionPoint * __thiscall CCmdTarget::GetConnectionHook(struct _GUID const &)" (?GetConnectionHook@CCmdTarget@@MAEPAUIConnectionPoint@@ABU_GUID@@@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "protected: virtual struct IConnectionPoint * __thiscall CCmdTarget::GetConnectionHook(struct _GUID const &)" (?GetConnectionHook@CCmdTarget@@MAEPAUIConnectionPoint@@ABU_GUID@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CCmdTarget::GetExtraConnectionPoints(class CPtrArray *)" (?GetExtraConnectionPoints@CCmdTarget@@MAEHPAVCPtrArray@@@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CCmdTarget::GetExtraConnectionPoints(class CPtrArray *)" (?GetExtraConnectionPoints@CCmdTarget@@MAEHPAVCPtrArray@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual struct IUnknown * __thiscall CCmdTarget::GetInterfaceHook(void const *)" (?GetInterfaceHook@CCmdTarget@@UAEPAUIUnknown@@PBX@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual struct IUnknown * __thiscall CCmdTarget::GetInterfaceHook(void const *)" (?GetInterfaceHook@CCmdTarget@@UAEPAUIUnknown@@PBX@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::OnCreateAggregates(void)" (?OnCreateAggregates@CCmdTarget@@UAEHXZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::OnCreateAggregates(void)" (?OnCreateAggregates@CCmdTarget@@UAEHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_EVENTSINKMAP const * __thiscall CCmdTarget::GetEventSinkMap(void)const " (?GetEventSinkMap@CCmdTarget@@MBEPBUAFX_EVENTSINKMAP@@XZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_EVENTSINKMAP const * __thiscall CCmdTarget::GetEventSinkMap(void)const " (?GetEventSinkMap@CCmdTarget@@MBEPBUAFX_EVENTSINKMAP@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_INTERFACEMAP const * __thiscall CCmdTarget::GetInterfaceMap(void)const " (?GetInterfaceMap@CCmdTarget@@MBEPBUAFX_INTERFACEMAP@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_CONNECTIONMAP const * __thiscall CCmdTarget::GetConnectionMap(void)const " (?GetConnectionMap@CCmdTarget@@MBEPBUAFX_CONNECTIONMAP@@XZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_CONNECTIONMAP const * __thiscall CCmdTarget::GetConnectionMap(void)const " (?GetConnectionMap@CCmdTarget@@MBEPBUAFX_CONNECTIONMAP@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_DISPMAP const * __thiscall CCmdTarget::GetDispatchMap(void)const " (?GetDispatchMap@CCmdTarget@@MBEPBUAFX_DISPMAP@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_OLECMDMAP const * __thiscall CCmdTarget::GetCommandMap(void)const " (?GetCommandMap@CCmdTarget@@MBEPBUAFX_OLECMDMAP@@XZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_OLECMDMAP const * __thiscall CCmdTarget::GetCommandMap(void)const " (?GetCommandMap@CCmdTarget@@MBEPBUAFX_OLECMDMAP@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CCmdTarget::GetTypeLib(unsigned long,struct ITypeLib * *)" (?GetTypeLib@CCmdTarget@@UAEJKPAPAUITypeLib@@@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CCmdTarget::GetTypeLib(unsigned long,struct ITypeLib * *)" (?GetTypeLib@CCmdTarget@@UAEJKPAPAUITypeLib@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual class CTypeLibCache * __thiscall CCmdTarget::GetTypeLibCache(void)" (?GetTypeLibCache@CCmdTarget@@UAEPAVCTypeLibCache@@XZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual class CTypeLibCache * __thiscall CCmdTarget::GetTypeLibCache(void)" (?GetTypeLibCache@CCmdTarget@@UAEPAVCTypeLibCache@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CCmdTarget::GetTypeInfoCount(void)" (?GetTypeInfoCount@CCmdTarget@@UAEIXZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CCmdTarget::GetTypeInfoCount(void)" (?GetTypeInfoCount@CCmdTarget@@UAEIXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::GetDispatchIID(struct _GUID *)" (?GetDispatchIID@CCmdTarget@@UAEHPAU_GUID@@@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::GetDispatchIID(struct _GUID *)" (?GetDispatchIID@CCmdTarget@@UAEHPAU_GUID@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::IsInvokeAllowed(long)" (?IsInvokeAllowed@CCmdTarget@@UAEHJ@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::IsInvokeAllowed(long)" (?IsInvokeAllowed@CCmdTarget@@UAEHJ@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CCmdTarget::OnFinalRelease(void)" (?OnFinalRelease@CCmdTarget@@UAEXXZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CCmdTarget::OnFinalRelease(void)" (?OnFinalRelease@CCmdTarget@@UAEXXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::OnCmdMsg(unsigned int,int,void *,struct AFX_CMDHANDLERINFO *)" (?OnCmdMsg@CCmdTarget@@UAEHIHPAXPAUAFX_CMDHANDLERINFO@@@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCmdTarget::OnCmdMsg(unsigned int,int,void *,struct AFX_CMDHANDLERINFO *)" (?OnCmdMsg@CCmdTarget@@UAEHIHPAXPAUAFX_CMDHANDLERINFO@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CWinApp::GetRuntimeClass(void)const " (?GetRuntimeClass@CWinApp@@UBEPAUCRuntimeClass@@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: __thiscall CWinApp::CWinApp(char const *)" (??0CWinApp@@QAE@PBD@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CWinApp::~CWinApp(void)" (??1CWinApp@@UAE@XZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol _atexit
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol _atexit
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol _atexit
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: static int __stdcall COleObjectFactory::RegisterAll(void)" (?RegisterAll@COleObjectFactory@@SGHXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "long __stdcall AfxDllGetClassObject(struct _GUID const &,struct _GUID const &,void * *)" (?AfxDllGetClassObject@@YGJABU_GUID@@0PAPAX@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: __thiscall AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2(class AFX_MODULE_STATE *)" (??0AFX_MAINTAIN_STATE2@@QAE@PAVAFX_MODULE_STATE@@@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "public: __thiscall AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2(class AFX_MODULE_STATE *)" (??0AFX_MAINTAIN_STATE2@@QAE@PAVAFX_MODULE_STATE@@@Z)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "long __stdcall AfxDllCanUnloadNow(void)" (?AfxDllCanUnloadNow@@YGJXZ)
    TiersdeConfiance.obj : error LNK2001: unresolved external symbol "public: static int __stdcall COleObjectFactory::UpdateRegistryAll(int)" (?UpdateRegistryAll@COleObjectFactory@@SGHH@Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol __except_list
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol __except_list
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass const CCmdTarget::classCCmdTarget" (__imp_?classCCmdTarget@CCmdTarget@@2UCRuntimeClass@@B)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CCmdTarget::~CCmdTarget(void)" (??1CCmdTarget@@UAE@XZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol __imp__printf
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "void __stdcall AfxOleLockApp(void)" (?AfxOleLockApp@@YGXXZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCmdTarget::EnableAutomation(void)" (?EnableAutomation@CCmdTarget@@QAEXXZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: __thiscall CCmdTarget::CCmdTarget(void)" (??0CCmdTarget@@QAE@XZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "void __stdcall AfxOleUnlockApp(void)" (?AfxOleUnlockApp@@YGXXZ)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_MSGMAP const CCmdTarget::messageMap" (__imp_?messageMap@CCmdTarget@@1UAFX_MSGMAP@@B)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_DISPMAP const CCmdTarget::dispatchMap" (__imp_?dispatchMap@CCmdTarget@@1UAFX_DISPMAP@@B)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_INTERFACEMAP const CCmdTarget::interfaceMap" (__imp_?interfaceMap@CCmdTarget@@1UAFX_INTERFACEMAP@@B)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: __thiscall COleObjectFactory::COleObjectFactory(struct _GUID const &,struct CRuntimeClass *,int,char const *)" (??0COleObjectFactory@@QAE@ABU_GUID@@PAUCRuntimeClass@@HPBD@
    Z)
    TiersdeConfianceAuto.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall COleObjectFactory::~COleObjectFactory(void)" (??1COleObjectFactory@@UAE@XZ)
    LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "public: __thiscall AFX_MODULE_STATE::AFX_MODULE_STATE(int,long (__stdcall*)(struct HWND__ *,unsigned int,unsigned int,long),unsigned long)" (??0AFX_MODULE_STATE@@QAE@HP6GJPAUHWND_
    _@@IIJ@ZK@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "public: static void __stdcall CNoTrackObject::operator delete(void *)" (??3CNoTrackObject@@SGXPAX@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall AFX_MODULE_STATE::~AFX_MODULE_STATE(void)" (??1AFX_MODULE_STATE@@UAE@XZ)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "long __stdcall AfxWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?AfxWndProc@@YGJPAUHWND__@@IIJ@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol __EH_prolog
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "void __stdcall AfxTermThread(struct HINSTANCE__ *)" (?AfxTermThread@@YGXPAUHINSTANCE__@@@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "void __stdcall AfxTermExtensionModule(struct AFX_EXTENSION_MODULE &,int)" (?AfxTermExtensionModule@@YGXAAUAFX_EXTENSION_MODULE@@H@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "int __stdcall AfxUnlockTempMaps(int)" (?AfxUnlockTempMaps@@YGHH@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "void __stdcall AfxLockTempMaps(void)" (?AfxLockTempMaps@@YGXXZ)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "class AFX_MODULE_STATE * __stdcall AfxSetModuleState(class AFX_MODULE_STATE *)" (?AfxSetModuleState@@YGPAVAFX_MODULE_STATE@@PAV1@@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "public: __thiscall CDynLinkLibrary::CDynLinkLibrary(struct AFX_EXTENSION_MODULE &,int)" (??0CDynLinkLibrary@@QAE@AAUAFX_EXTENSION_MODULE@@H@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "int __stdcall AfxInitExtensionModule(struct AFX_EXTENSION_MODULE &,struct HINSTANCE__ *)" (?AfxInitExtensionModule@@YGHAAUAFX_EXTENSION_MODULE@@PAUHINSTANCE__@@@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "void __stdcall AfxWinTerm(void)" (?AfxWinTerm@@YGXXZ)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "class AFX_MODULE_STATE * __stdcall AfxGetModuleState(void)" (?AfxGetModuleState@@YGPAVAFX_MODULE_STATE@@XZ)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "int __stdcall AfxWinInit(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int)" (?AfxWinInit@@YGHPAUHINSTANCE__@@0PADH@Z)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "class _AFX_THREAD_STATE * __stdcall AfxGetThreadState(void)" (?AfxGetThreadState@@YGPAV_AFX_THREAD_STATE@@XZ)
    mfcs42.lib(dllmodul.obj) : error LNK2001: unresolved external symbol "void __stdcall AfxCoreInitModule(void)" (?AfxCoreInitModule@@YGXXZ)
    OLDNAMES.lib(stat.obi) : error LNK2001: unresolved external symbol __imp___stat
    Release/TiersdeConfiance.dll : fatal error LNK1120: 96 unresolved externals
    Error executing link.exe.

    TiersdeConfiance.dll - 131 error(s), 8 warning(s)[/fixed]

    131 erreurs, je suis désespéré. :sweat:

  2. #2
    Expert éminent
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 395
    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 395
    Par défaut
    Ce sont les includes C qu'il faudra modifier pour ajouter les #ifdef __cplusplus extern "C" { endif là où ils vont bien.

    Tu ne dois absolument pas entourer TOUS les includes de blocs extern "C"...

    Plus d'infos sur extern "C" et la façon de lier C et C++ :
    http://www.developpez.net/forums/sho...12&postcount=4
    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 confirmé
    Inscrit en
    Septembre 2006
    Messages
    110
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 110
    Par défaut
    Ca marche pas mieux, j'ai décorer toutes les déclarations dans les .h en C includés avec le bon vieux :
    #ifdef __cplusplus extern "C" { #endif
    //et bla bla bla
    #ifdef __cplusplus } #endif

    J'ai même plus d'erreurs (134) .

  4. #4
    Expert éminent
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 395
    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 395
    Par défaut
    Je n'ai JAMAIS dit qu'il fallait les mettre sur une ligne... Évidemment que sur une ligne ça foire...
    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 confirmé
    Inscrit en
    Septembre 2006
    Messages
    110
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 110
    Par défaut
    Mais oui, je sais de toute façon sans parler de linkage, ca compilerait pas.

    #ifdef __cplusplus
    extern "C" {
    #endif
    STATUS TEDETIS_E_sendEnvelop(char* envValue, struct SSLSessionInfo* sslSessionHandle, int** returnedEnv, char **erreurlist);

    STATUS TEDETIS_E_getNextDailyEnvSerial(struct SSLSessionInfo* sslSessionHandle, int *serial, char **erreurlist);

    STATUS TEDETIS_E_getStatus(int transaction, struct SSLSessionInfo* sslSessionHandle, int *status, char **erreurlist);
    #ifdef __cplusplus
    }
    #endif


    Vive la France, et vive Java !

  6. #6
    Expert éminent
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 395
    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 395
    Par défaut
    Il faut trouver quelles fonctions sont bien en C, quelles fonctions C++ doivent être accessibles en C,etc.
    Ne pas oublier que le extern "C" doit être consistant: Une fonction C++ doit être à la fois déclarée et définie en extern "C" si elle doit être accessible en C...

    Et aussi, on dirait que beaucoup de tes erreurs sont dues à la CRT et MFC : Tu devrais vérifier les options de linkage de la CRT et MFC...
    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.

Discussions similaires

  1. Réponses: 0
    Dernier message: 01/03/2009, 14h44
  2. Réponses: 0
    Dernier message: 29/11/2008, 09h19
  3. Réponses: 2
    Dernier message: 12/11/2008, 19h33
  4. Réponses: 3
    Dernier message: 02/03/2008, 17h02
  5. [C#][Visual C# Express] Gros souci avec Excel
    Par poullos dans le forum EDI/Outils
    Réponses: 7
    Dernier message: 18/11/2005, 13h15

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