如何用 C++ 编译 FANN包装纸?

发布于 2024-12-24 17:31:46 字数 1245 浏览 1 评论 0原文

我正在尝试将 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 libfann

Error 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文