Windows kendi PHP uzantısı derlemek, ama LNK 2005 hatası var

1 Cevap php

Ben VC 2008 express kullanıyorum ve bu benim kendi PHP uzantısı derlemeye çalıştım duyuyorum. Aşağıdaki hata hakkında herhangi bir fikir?

------ Rebuild All started: Project: xsplit, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'xsplit', configuration 'Debug|Win32'
Compiling...
xsplit.cpp
c:\x\php-5.3.1\zend\zend_execute.h(231) : warning C4018: '>' : signed/unsigned mismatch
.\xsplit.cpp(64) : warning C4091: 'typedef ' : ignored on left of '_dict' when no variable is declared
.\xsplit.cpp(154) : warning C4101: 'file_size' : unreferenced local variable
.\xsplit.cpp(153) : warning C4101: 'fd' : unreferenced local variable
.\xsplit.cpp(417) : warning C4244: '=' : conversion from 'Darts::DoubleArrayBase<ValueType>::size_type' to 'float', possible loss of data
        with
        [
            ValueType=int
        ]
.\xsplit.cpp(418) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
.\xsplit.cpp(426) : warning C4244: '=' : conversion from 'size_t' to 'float', possible loss of data
.\xsplit.cpp(436) : warning C4244: '=' : conversion from 'Darts::DoubleArrayBase<ValueType>::size_type' to 'float', possible loss of data
        with
        [
            ValueType=int
        ]
.\xsplit.cpp(437) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
.\xsplit.cpp(445) : warning C4244: '=' : conversion from 'size_t' to 'float', possible loss of data
.\xsplit.cpp(455) : warning C4244: '=' : conversion from 'Darts::DoubleArrayBase<ValueType>::size_type' to 'float', possible loss of data
        with
        [
            ValueType=int
        ]
.\xsplit.cpp(456) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
.\xsplit.cpp(464) : warning C4244: '=' : conversion from 'size_t' to 'float', possible loss of data
.\xsplit.cpp(800) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(74) : see declaration of 'strcpy'
.\xsplit.cpp(932) : warning C4101: 'hashval' : unreferenced local variable
.\xsplit.cpp(931) : warning C4101: 'arrht' : unreferenced local variable
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation.  All rights reserved.
Linking...
Searching libraries
    Searching C:\x\php-5.3.1\bindlib_w32\php5ts.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
    Searching C:\x\php-5.3.1\bindlib_w32\libcpmtd.lib:
libcpmtd.lib(cerr.obj) : error LNK2005: "bool __cdecl std::_Fputc<char>(char,struct _iobuf *)" (??$_Fputc@D@std@@YA_NDPAU_iobuf@@@Z) already defined in xsplit.obj
libcpmtd.lib(cerr.obj) : error LNK2005: "bool __cdecl std::_Ungetc<char>(char const &,struct _iobuf *)" (??$_Ungetc@D@std@@YA_NABDPAU_iobuf@@@Z) already defined in xsplit.obj
libcpmtd.lib(cerr.obj) : error LNK2005: "bool __cdecl std::_Fgetc<char>(char &,struct _iobuf *)" (??$_Fgetc@D@std@@YA_NAADPAU_iobuf@@@Z) already defined in xsplit.obj
libcpmtd.lib(cerr.obj) : error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all@_Container_base_secure@std@@QBEXXZ) already defined in xsplit.obj
libcpmtd.lib(string.obj) : error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all@_Container_base_secure@std@@QBEXXZ) already defined in xsplit.obj
libcpmtd.lib(locale0.obj) : error LNK2005: "void * __cdecl operator new(unsigned int,void *)" (??2@YAPAXIPAX@Z) already defined in xsplit.obj
libcpmtd.lib(locale0.obj) : error LNK2005: "void __cdecl operator delete(void *,void *)" (??3@YAXPAX0@Z) already defined in xsplit.obj
libcpmtd.lib(locale0.obj) : error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all@_Container_base_secure@std@@QBEXXZ) already defined in xsplit.obj
    Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\LIBCMTD.lib:
    Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
    Searching C:\x\php-5.3.1\bindlib_w32\php5ts.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
    Searching C:\x\php-5.3.1\bindlib_w32\libcpmtd.lib:
Finished searching libraries
Searching libraries
    Searching C:\x\php-5.3.1\bindlib_w32\php5ts.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
    Searching C:\x\php-5.3.1\bindlib_w32\libcpmtd.lib:
    Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\LIBCMTD.lib:
    Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
    Searching C:\x\php-5.3.1\bindlib_w32\php5ts.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
    Searching C:\x\php-5.3.1\bindlib_w32\libcpmtd.lib:
Finished searching libraries
c:\xproject\xsplit\Debug\xsplit.dll : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://c:\xproject\xsplit\xsplit\Debug\BuildLog.htm"
xsplit - 9 error(s), 16 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

1 Cevap

Nerede bu LIBCPMTD.LIB aldınız?

  • Sizin. Dll proje olarak aynı /Mx ayarları ile derlendi?
  • Eğer function level linking biri veya her ikisi projelerde kullanmak mı?