Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
625 views
in Technique[技术] by (71.8m points)

compilation - XCode - #include <map> in ml.hpp : No such file or directory

I'm trying to compile a C++ code (OpenCV) and I'm going to the end. I just have a few "No such file or directory" compile error into XCode 4 on those lines :

#include <map>
#include <string>
#include <iostream>

What may I include to make it find the "files" ?

I don't see.

I use another project based on OpenCV with Objective-C inside for example that pass the compile process with success, files are the same, and I checked all the Build settings lines one after the other, and it's all the same, except the search pathes that are updated to go to my own project folders. Folder architecture is the same...

I've read this link but it doesn't seems to be the solution as I should not have to add code anywhere of change files, since I don't use any of the code and the example project works fine like this. I've just included into one of my .m files, exactly like the example project.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've just included into one of my .m files, exactly like the example project.

If you want to use C++ classes, you must use Objective-C++. Your source files (not your header files, mind - the source files that #include them) must have a .mm extension.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...