-
November 2nd, 2009, 05:48 PM
#1
Link python26.lib to my app
Hello all,
I'm having troubles linking python statically to my application
I downloaded the python's sources and compiled, all good
I added the library as a dependency (python26.lib)
compilation succeed
BUT, when I run the application its looking for the python26.dll !!!
what is the problem here ?
anybody knows ?
thanx
Eli
-
November 2nd, 2009, 10:00 PM
#2
Re: Link python26.lib to my app
Have you put python26.dll into the same directory as your .exe file?
-
November 3rd, 2009, 08:15 AM
#3
Re: Link python26.lib to my app
no
I mean if I statically link python26.lib to my app
why do I need the dll ?
am I missing something ?
-
November 3rd, 2009, 10:33 AM
#4
Re: Link python26.lib to my app
Originally Posted by Rockem
Hello all,
I'm having troubles linking python statically to my application
I downloaded the python's sources and compiled, all good
I added the library as a dependency (python26.lib)
Did you build an import library or static library? Just stating "I added the library" doesn't mean anything until you can clarify which one you built, either import or static library.
Regards,
Paul McKenzie
-
November 3rd, 2009, 10:40 AM
#5
Re: Link python26.lib to my app
Originally Posted by Rockem
no
I mean if I statically link python26.lib to my app
Either you created a static library and then linking it, or you created a DLL and you are linking the import library that was created when the DLL was created.
In other words, you may have built a new python DLL, and you're using the .LIB file that the DLL created, thinking that this .LIB file is a static library (when it isn't).
OR
You may need to tell your app via preprocessor constant(s) that you are using the static library when you build your app, so that your app doesn't assume you're using the DLL. The app could have macros, pragmas, etc. that are changed or turned on/off, depending on how the python code is to be called (via DLL or object code that was linked in).
Regards,
Paul McKenzie
Last edited by Paul McKenzie; November 3rd, 2009 at 11:01 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|