我有一个 C 项目,我想在其中使用一些 C++ 文件。 我已经相应地修改了 Makefile,但我得到了
make\mingw32-make.exe[1]: *** No rule to make target
错误。
我注意到没有找到 cpp 标准库中包含的 header 。
[编辑] 请注意,所有 .c、.cpp、.h 文件都位于同一文件夹中。
如果我添加
#include <string>
在.c 文件中找到它。在 .cpp 中则不然。
在 Eclipse 中,我发现无法为 C++ 设置包含。
有办法做到这一点吗?
谢谢。
最佳答案
不幸的是我没有找到解决这个问题的方法。 我仍然走在正确的道路上,因为有一种方法可以使用 Alglib 中的 C 代码。
http://forum.alglib.net/viewtopic.php?f=2&t=3766
It may be better to download CPython version of ALGLIB and to work with source of its computational core. It is written in C, without even trace amounts of C++, so you may find it more convenient than making wrappers around C++ core.
关于c++ - 如何配置 Eclipse C 项目以接受 C++ 包含,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38911816/