如何用 C++ 编译 FANN包装纸?
我正在尝试将 FANN 库 包装到附加的下载 zip 包装器 (fann_cpp.h
)但我不知道该怎么做。当我正常编译库时,我不会收到任何错误,但是当我
在我的源代码或库的源代码中#include "fann_cpp.h"
时,我收到这些错误(其中 100 个):
错误 1 错误 C2143:语法错误:在“:”c:\program 之前缺少“{” 文件 (x86)\microsoft Visual Studio 9.0\vc\include\cstdio 39 libfann
错误 2 错误 C2059:语法错误:“:”c:\program files (x86)\microsoft Visual Studio 9.0\vc\include\cstdio 39 libfann
编辑
错误或多或少出现在 cstdio
using ::_Filet;
using ::size_t; using ::fpos_t; using ::FILE;
using ::clearerr; using ::fclose; using ::feof;
using ::ferror; using ::fflush; using ::fgetc;
using ::fgetpos; using ::fgets; using ::fopen;
using ::fprintf; using ::fputc; using ::fputs;
using ::fread; using ::freopen; using ::fscanf;
using ::fseek; using ::fsetpos; using ::ftell;
using ::fwrite; using ::getc; using ::getchar;
using ::gets; using ::perror;
using ::putc; using ::putchar;
EDIT2
的这些行上我不知道是否可能是这种情况,但我已经解决了一件事:
- 我一直在研究附加到库本身的解决方案的项目,所以我认为这可能是问题所在,因为它是用 C (而不是 C++)编写的
- 我有用 C++ 创建了一个新项目,复制了所有设置等,现在它可以工作了
I am trying to wrap the FANN library with attached to the download zip wrapper (fann_cpp.h
) but I have no idea how to do it. When I compile the library normally i don't get any errors but when I
#include "fann_cpp.h"
in my source or the library's source then i get these errors (100 of them) :
Error 1 error C2143: syntax error : missing '{' before ':' c:\program
files (x86)\microsoft visual studio 9.0\vc\include\cstdio 39 libfannError 2 error C2059: syntax error : ':' c:\program files
(x86)\microsoft visual studio 9.0\vc\include\cstdio 39 libfann
EDIT
The errors are more or less on these lines of cstdio
using ::_Filet;
using ::size_t; using ::fpos_t; using ::FILE;
using ::clearerr; using ::fclose; using ::feof;
using ::ferror; using ::fflush; using ::fgetc;
using ::fgetpos; using ::fgets; using ::fopen;
using ::fprintf; using ::fputc; using ::fputs;
using ::fread; using ::freopen; using ::fscanf;
using ::fseek; using ::fsetpos; using ::ftell;
using ::fwrite; using ::getc; using ::getchar;
using ::gets; using ::perror;
using ::putc; using ::putchar;
EDIT2
I do not know if this might be the case but I have sorted out one thing :
- I have been working on the project attached to solution with the library itself so I think it might have been the problem because it is in C (not C++)
- I have made a new project in C++ copied all the settings etc. and now it works
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论