2011-04-15 119 views
0

我是一個倒黴的Linux編碼器,試圖讓我的項目中的一個在Windows 7中工作,其中涉及構建TagPy。我正在使用MSVC2008和Python 2.7.1(x86版本)。鏈接失敗在Windows上構建TagPy

我已成功安裝CMake並構建了TagLib,並從BoostPro安裝程序安裝了Boost標頭和Boost.Python二進制文件。我已經在configure.py中設置了boost和taglib庫目錄,包括dirs和lib名稱以及boost編譯器。

我的%path%,%lib%和%libpath%具有添加的MSVC等目錄,如VC提供的批處理腳本所設置的。

我得到的鏈接以下錯誤:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo 
/INCREMENTAL:NO "/LIBPATH:C:/Program Files (x86)/taglib/lib" "/LIBPATH:C:\Progra 
m Files (x86)\boost\boost_1_46_1\lib" /LIBPATH:C:\Python27\libs /LIBPATH:C:\Pyth 
on27\PCbuild tagd.lib boost_python-vc90-mt-1_46_1.lib /EXPORT:init_tagpy build\t 
emp.win32-2.7\Release\src/wrapper/basics.obj build\temp.win32-2.7\Release\src/wr 
apper/id3.obj build\temp.win32-2.7\Release\src/wrapper/rest.obj /OUT:build\lib.w 
in32-2.7\_tagpy.pyd /IMPLIB:build\temp.win32-2.7\Release\src/wrapper\_tagpy.lib 
/MANIFESTFILE:build\temp.win32-2.7\Release\src/wrapper\_tagpy.pyd.manifest 

    Creating library build\temp.win32-2.7\Release\src/wrapper\_tagpy.lib and obje 
ct build\temp.win32-2.7\Release\src/wrapper\_tagpy.exp 

basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) pu 
blic: __thiscall TagLib::String::String(class std::basic_string<wchar_t,struct s 
td::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,enum TagLib::St 
ring::Type)" ([email protected]@@[email protected][email protected][email protected][email protected] 
[email protected]@[email protected][email protected]@@[email protected]@[email protected]@@Z) referenced in function "public: stati 
c void __cdecl boost::python::converter::implicit<class std::basic_string<wchar_ 
t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class TagLib: 
:String>::construct(struct _object *,struct boost::python::converter::rvalue_fro 
m_python_stage1_data *)" ([email protected][email protected][email protected]_WU?$char_traits 
@[email protected]@@[email protected][email protected]@@[email protected]@[email protected]@@@[email protected]@[email protected]@SAXPAU 
[email protected]@[email protected]@@Z) 

build\lib.win32-2.7\_tagpy.pyd : fatal error LNK1120: 1 unresolved externals 

我缺少什麼?

(注:我以前曾在解析的外部以及升壓有關的異常,但傳遞/ EHSC作爲固定的編譯器標誌)

回答

0

this answer,我認爲這是同樣的問題。 /Zc:wchar_t-標誌將在下一個TagLib版本中消失,但現在它已在默認的CMakeLists.txt文件中啓用。

+0

啊,是的,這是正確的。從CMakeLists.txt中刪除該標誌已成功構建。稍後,有人會想到%PATH%,並且看到TagPy的工作原理! – Sam 2011-04-15 21:45:36