2013-01-01 65 views
1

當我嘗試在C:\ boost_1_50_0 \ libs \ python \ example \ quickstart下運行示例時,出現以下錯誤,我的python文件被刪除(這很煩人)。我在Windows 7操作系統上使用Python 3.3 & Boost 1.50。Boost Python quickstart示例給出錯誤

C:\ boost_1_50_0 \庫\蟒\示例\快速啓動>的bjam工具集= MSVC --verbose測試 測試>的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 

所以這裏還有2個錯誤該需要修復:

a)copy test_extending.py 該命令的語法不正確。

b)鏈接:錯誤LNK2001:解析外部符號_mainCRTStartup

任何想法我如何解決這一問題?

+0

那麼,你有沒有固定項目b)? – peterdemin

+0

沒有抱歉,我永遠不能得到它的工作..我希望你在這裏添加解決方案,如果你能解決問題。 – rockstar

回答

0

我不確定a)有什麼問題。問題b)似乎是boost示例中的一個錯誤,jam文件試圖從可執行文件而不是靜態lib或cpp文件中生成測試執行文件。

documented what I had to do獲取嵌入示例運行。