Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8960803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:44:28+00:00 2026-06-15T15:44:28+00:00

I see many people showing how I can use the Python API in C++

  • 0

I see many people showing how I can use the Python API in C++ however, it seems I don’t have the API or reference already when I include:

#include "Python.h"

or

#include <Python.h>

I had a look at these sites and gives me everything except where I can get this reference:

  • http://www.codeproject.com/Articles/11805/Embedding-Python-in-C-C-Part-I
  • http://docs.python.org/2/c-api/index.html

I had already installed Python 2.7 and I wondered if other downloads from python.org had my answer. I installed IronPython but had no success.

Where can I get this reference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:44:29+00:00Added an answer on June 15, 2026 at 3:44 pm

    It sounds like you’re unclear on how your compiler and linker works. #include is a pre-processor instruction which inserts another file into that point in the file which contains the statement. However, your compiler needs to know where to look for the file, so you need to have the folder which contains Python.h either in your IDE’s list of include locations (in Visual Studio for example, this can be done either on a per-project basis, or for the whole IDE), or as an environment variable in your OS.

    If the library is a header only library, then that is sufficient, as the whole of the library gets inserted into your code, which is then compiled. However, you’ve indicated that you’re getting a LINK error, which means that although it’s been able to find the declarations in Python.h, the linker doesn’t know where to find the compiled definitions (which are stored in python27_d.lib). So you also need to add the location of that file to your IDE’s list of library locations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see many Java packages have api, impl and bundle jars (name-api.jar, name-impl.jar, name-bundle.jar).
It seems like many people have some issues once they start adding video into
I see many nice feature of JDEE in Emacs . However installation seems to
I have read many people really like the MapMaker of Google Guava (Collections), however
I see that many people get this error, but their situations all appear a
I see many people coming to my facebook game with HTTP referer that includes
When take some tutorial from web, I see many people leaves tags open like
I have a PHP/MySQL sign-up system that limits the number of people who can
I thought I would ask this question to see why many examples and people
I see many user interface control libraries for .NET, but where can I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.