Hi, When I try to use the cl -LD test.c -test.dll
, it says can not open "python26.lib"
, why this happens?? thank you. (I was trying to generate a dll
file by this command so that python could call it)
views:
28answers:
1
+1
A:
Taken from this link - Hope this will help you -
This is caused by the following lines in the file c:\Python26\include \pyconfig.h
# ifdef _DEBUG
# pragma comment(lib,"python26_d.lib")
# else
# pragma comment(lib,"python26.lib")
# endif /* _DEBUG */
So please:
- Provide python26_d.lib in the installer.
or
- Remove this automatic "pragma comment lib" from pyconfig.h, since I can't disable it from the outside (as far as I know).
Sachin Shanbhag
2010-09-10 10:01:52
@Sachin, thank you, I also searched this link, then I copy the python26.dll into my c file folder, it did not show the same error, but it showed : "fatal error LNK1120: 1 unsolved external"
serina
2010-09-10 10:28:12
Sachin Shanbhag
2010-09-10 10:32:17