I just touch on CentOS, using Neatbeans to develop C + + project, because of the project reason, need to call Python script in C + + project, in this process encountered some problems, are relatively basic, write this article to take notes.
Environment
Operating system: CentOS 6.6
Development tools: Neatbeans 8.0.2
The system has its own python, and the version is 2.6.
The first step: Create a new project, and add the corresponding code, the source code is as follows
Contains the Python header file, and in main, the initialization method is called.
Step two: When building, the following error is reported
Header file not found, so need to include the corresponding header file
Step three: Include the directory where the Python header file resides
Fourth step: Build, there will still be problems, as follows
Undefined reference to ' py_initialize ' means no dynamic link library found
Fifth step: include the corresponding dynamic library files separately
Sixth Step: Build success
Using Neatbeans to develop C + + on CentOS, calling Python, problems encountered and workarounds