错误LNK1104:无法打开文件``python27.lib''PyISAPIe [英] Error LNK1104: cannot open file 'python27.lib' PyISAPIe
问题描述
正在尝试使用VS2010编译64位版本的PyISAPIe.我不习惯C/C ++编程,但是可以为VS2010配置一些设置.一切进展顺利,直到出现上述错误的链接阶段.我检查了所有库路径设置,它们看起来不错.下面是我用于构建DLL的命令行:
Am trying to compile a 64bit version of PyISAPIe using VS2010. Am not used to C/C++ programming but managed to configure some settings for VS2010. Everything went well until it got to the linking stage where it gave the above mentioned error. I checked all the Library path settings and they looked fine. Below is my command line for building the DLL:
/OUT:"x64\Release\PyISAPIe.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\pyisapie\Python\x64\Python27\libs" /LIBPATH:"C:\pyisapie\Python\x64\Python26\libs" /LIBPATH:"C:\pyisapie\Python\x64\Python25\libs" /DLL "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /NODEFAULTLIB:"libc libcmt msvcrt" /DEF:"PyISAPIe.def" /MANIFEST /ManifestFile:"x64\Release\PyISAPIe.dll.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\pyisapie\x64\Release\PyISAPIe.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /PGD:"C:\pyisapie\x64\Release\PyISAPIe.pgd" /LTCG /TLBID:1 /DYNAMICBASE:NO /IMPLIB:"x64\Release\PyISAPIe.lib" /MACHINE:X64 /ERRORREPORT:QUEUE
/OUT:"x64\Release\PyISAPIe.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\pyisapie\Python\x64\Python27\libs" /LIBPATH:"C:\pyisapie\Python\x64\Python26\libs" /LIBPATH:"C:\pyisapie\Python\x64\Python25\libs" /DLL "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /NODEFAULTLIB:"libc libcmt msvcrt" /DEF:"PyISAPIe.def" /MANIFEST /ManifestFile:"x64\Release\PyISAPIe.dll.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\pyisapie\x64\Release\PyISAPIe.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /PGD:"C:\pyisapie\x64\Release\PyISAPIe.pgd" /LTCG /TLBID:1 /DYNAMICBASE:NO /IMPLIB:"x64\Release\PyISAPIe.lib" /MACHINE:X64 /ERRORREPORT:QUEUE
路径 C:\ pyisapie \ Python \ x64 \ Python27 \ libs 存在并且包含python27.lib.
The path C:\pyisapie\Python\x64\Python27\libs exists and containes python27.lib.
任何人都可以帮助我.预先感谢
Can anyone help me out. Thanks in advance
推荐答案
由于没有正确设置LIBPATH,我遇到了同样的问题.这可能不是您的错误消息的原因,但这是我的原因.
I had the same issue due to not setting the LIBPATH correctly. This may not be the cause of your error message, but it was the cause of mine.
要在Visual Studio中解决该问题,请右键单击PyISAPIe项目,然后选择: 属性>配置属性>链接器>常规
To resolve it in Visual Studio right click on the PyISAPIe project and select: Properties > Configuration Properties > Linker > General
然后确保路径"C:\pyisapie\Python\x64\Python27\libs
"(或相对路径)在其他库目录"中列出
Then make sure that the path C:\pyisapie\Python\x64\Python27\libs
(or the relative path) is listed in the "Additional Library Directories"
这篇关于错误LNK1104:无法打开文件``python27.lib''PyISAPIe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!