Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Need some help embedding Python in C++, following the article:
Embedding Python in C/C++: Part I[^]

My system:
Windows 7 64bit
Python 2.7
VS 2005

I've already included Python27/lib and Python27/include in my VC++ additional include directories. In addition, I was using "release" mode. However, I still have the fatal error:
LINK : fatal error LNK1104: cannot open file 'python27.lib'

Anyone has the similar problem before?

Thanks!!
Posted

Your question would be better placed at the bottom of the article in question rather than here. You stand a much better chance of the author seeing it then and being able to answer.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 8-Nov-12 18:40pm    
Agree, a 5.
--SA
fjdiewornncalwe 8-Nov-12 18:50pm    
Thanks, Sergey
Qianfei Li 9-Nov-12 12:20pm    
Thanks for the thought!
If you're going down that road, you're probably better off basing your work on Boost Python[^]

As for your error:LINK : fatal error LNK1104: cannot open file 'python27.lib'

You need to tell the linker where to find the library.
Linker->General->Additional Library Directories

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 8-Nov-12 18:41pm    
Another link to an interesting project, a 5, good to know, thank you for sharing.
--SA
Espen Harlinn 8-Nov-12 18:51pm    
Thanks, Sergey - If you could have a look at http://www.codeproject.com/Articles/471662/Windows-Development-in-Cplusplus-working-with-menu
Any thoughts you would have about it would be greatly appreciated
Sergey Alexandrovich Kryukov 19-Nov-12 18:43pm    
Looks nice, but, according to my records. 2 more of your articles wait in line for my review. First of all, I found some problems in your work on dependencies -- very nice WPF technique and styling, but I wish you had more essential functionality. Another one is on Direct2D. I'll try to review them, if I find I have enough expertize on the topics, but some time later. I have 100% complete code to publish an article by myself, cannot get enough courage to sit down and write the whole text at once, waiting for more room in my free time... I don't count 2-3 articles with "almost complete" code and one major work... Hopefully, I'll get some time and prioritize it all soon enough...
--SA
Espen Harlinn 19-Nov-12 19:08pm    
My last 4 articles share the same codebase, currently crawling towards 1.7MB of C++ code - and it's fair to say I've only just got started.

So I've put a wee bit more work into the code than the articles - so far I'm only creating "lego" bricks, that is the basic building blocks for a framework.

As for Depends4Net - I certainly intended to do a bit more work on it, but so far I haven't gotten around to it ;)

>> cannot get enough courage to sit down and write the whole text at once
I would certainly describe some of mine as work-in-progress - still, I think, getting some feedback is quite useful. Look at the difference between the two articles on Depends4Net - the first has a nice picture on the top, while the second contains far more practical code examples and descriptions - still, the first got far better response. I tend to view it as a learning experience ...
Sergey Alexandrovich Kryukov 19-Nov-12 19:34pm    
I was talking it because earlier I relatively easily programmatically detected dependency diagram; even though I did it in console application, I needed work result, not application. Maybe you could use the idea. Actually, messing with all this stuff is very useful when you just get some project made by a team before you, and really need to dig into this can of worms to sort things out... :-)
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900