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作为固定的编译器标志)
啊,是的,这是正确的。从CMakeLists.txt中删除该标志已成功构建。稍后,有人会想到%PATH%,并且看到TagPy的工作原理! – Sam 2011-04-15 21:45:36