当我尝试在C:\boost_1_50_0\libs\python\example\quickstart下运行这个示例时,我得到了以下错误,并且我的python文件被删除(这非常恼人)。我在Windows 7操作系统上使用Python 3.3 & Boost 1.50。
详细测试-- C:\boost_1_50_0\libs\python\example\quickstart>bjam - toolset=msvc > error_log
error_log:
...patience...
...patience...
...found 1662 targets...
...updating 11 targets...
copy test_extending.py
The syntax of the command is incorrect.
copy /b + this-file-does-not-exist-A698EE7806899E69 "test_extending.py" "bin\test_ext.test\msvc-10.0\debug\threading-multi\test_extending.py"
...failed copy test_extending.py bin\test_ext.test\msvc-10.0\debug\threading-multi\test_extending.py...
...removing test_extending.py
compile-c-c++ bin\msvc-10.0\debug\threading-multi\extending.obj
extending.cpp
msvc.link.dll bin\msvc-10.0\debug\threading-multi\extending.pyd
Creating library bin\msvc-10.0\debug\threading-multi\extending.lib and object bin\msvc-10.0\debug\threading-multi\extending.exp
msvc.manifest.dll bin\msvc-10.0\debug\threading-multi\extending.pyd
...skipped <pbin\test_ext.test\msvc-10.0\debug\threading-multi>test_ext for lack of <pbin\test_ext.test\msvc-10.0\debug\threading-multi>test_extending.py...
msvc.link bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe
LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe : fatal error LNK1120: 1 unresolved externals
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DEBUG /MACHINE:X86 /subsystem:console /out:"bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe" /LIBPATH:"C:\Python33\libs" @"bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
...failed msvc.link bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe所以这里有两个需要修复的错误:
A)复制test_extending.py命令语法不正确。
B)链接:错误LNK2001:未解析的外部符号_mainCRTStartup
你知道我该怎么解决这个问题吗?
发布于 2015-04-11 01:41:48
我不确定a)有什么问题。问题b)似乎是boost示例中的错误,jam文件试图从可执行文件而不是静态lib或cpp文件生成测试可执行文件。
我使用documented what I had to do来运行嵌入示例。
https://stackoverflow.com/questions/14109746
复制相似问题