c和c++混编出错 D8045:如何解决
c和c++混编出错 D8045:怎么解决出错详细D8045: cannot compile C file bncore.c with the /clr optionbn
c和c++混编出错 D8045:怎么解决
出错详细
D8045: cannot compile C file 'bncore.c' with the /clr option
bncore.c文件内容
#include "tommath.h"
#ifdef BNCORE_C
int KARATSUBA_MUL_CUTOFF = 80;
int KARATSUBA_SQR_CUTOFF = 120;
intTOOM_MUL_CUTOFF = 350;
int TOOM_SQR_CUTOFF = 400;
#endif
在cpp文件中已经加入
extern "C" {
#include "tommath.h"
}
有别处说设置工程属性为no common language run time没用
[解决办法]关闭掉common language run time
不要使用.net framework
不要使用“托管c++”
[解决办法]他那个 Form1 明显的是托管窗口
[解决办法]
他那个 Form1 明显的是托管窗口
意思让我用MFC?
我要做有界面的,不要控制台
你要做GUI界面的应用,可以用MFC,更好的选择是QT、GTK、wx……但唯独不要用.net framework。
如果你一定要用.net framework,那就改用C#吧,不要用C++,暂时也不要去考虑调用C代码。
所谓“托管的C++”,其实就是个四不像。