Home > Software engineering >  VC2012 call Python can't open include file "inttypes. H"
VC2012 call Python can't open include file "inttypes. H"

Time:11-20

On a desktop computer with fine a MFC call Python project, go to the laptop problems, to strive for two days, a reluctance to use, and its record,

On the desktop computer configuration is

VS2012 + Python 3.5.2 (64 - bit Anaconda3 4.4.1),

Laptop original configuration is the same as desktop computers, later to upgrade Python, so laptop configuration is

VS2012 + Python 3.6.2 (Anaconda3 5.0.0 64 - bit)

This laptop separate Python programs can be very good luck,

Copies the MFC project on desktop computers to laptops, compilation, there is an error:

Fatal error C1083: cannot open include file: "inttypes. H" : No to the file or directory

Thought, the Python downgraded to just the same as the desktop computer, think of to do, immediately uninstall Python, reinstall Python 3.5.2 (64 - bit Anaconda3 4.4.1), however, serious problems have appeared, the Python was unable to run,

Check the baidu, see an article, problem is the same with me,

https://blog.csdn.net/lpls0213/article/details/86538759

According to the steps in the article, again and again, still won't do, installed the many times repeatedly, each time you run a separate Python program, the result is "Python to stop working," desperation, or return to senior Python version, uninstall low version, on a laptop to install the Python 3.6.2 (Anaconda3 5.0.0 64 - bit), now, a separate Python program finally be able to run, for more than a day time, back to the origin,

Compile the MFC project, or a problem: fatal error C1083: cannot open include file: "inttypes. H" : No to the file or directory

On the Internet to find inttypes. J h, found here,

https://blog.csdn.net/chinabinlang/article/details/25377841

The article mentioned: download FFmpeg "- full - SDK - 3.2", this resource is more, after decompression, found from it: inttypes. H and stdint. H

Here at last found the FFmpeg - full - SDK - 3.2,

http://en.verysource.com/download/ffmpeg_full_sdk_3_2_rar-788860.html

Download, unzip and inttypes. H is copied to the

C: \ Program Files \ Microsoft Visual Studio (x86) VC 11.0 \ \ include

Compile the MFC project, finally passed, and dry, have seemed almost immediately run the exe file of the MFC project, head a pot of cold water, "because I couldn't find python36. DLL, can't continue to execute code, reinstall the program may solve the problem",

This is what the devil, clearly in the C: \ ProgramData \ under Anaconda3 have python36 DLL, this file must be a good path is not set, check information,

https://blog.csdn.net/weixin_30856725/article/details/99017812

Mentioned three methods, according to the context path configuration method and the working directory, all failed, finally the DLL file is copied to the exe file directly to the same folder, and finally the MFC project can run correctly,

Although finally solved the problem, but left the two questions, so far no solution:

1, after the Anaconda unloading high version, how to install the low version?

2, the MFC project DLL path should be how to set up?


CodePudding user response:

I'm here to thumb up!
  • Related