2

I'm using a SDK in one of my projects and when adding in the libraries etc, I get an error from this line of code, which is from inside a .h file. I cannot change the .m since its not available to me. Its inside .a (lib)

-(enum scanDeviceID)ID; 

And the error message is:

Semantic Issue ISO C++ forbids forward references to 'enum' types

Are there any compilier/build setting that I can modify to make this work?

Failing that, I know very little C++, is there something on the line of code I can change to make it work?

4

1 回答 1

2

这行代码说这个方法返回一个在scanDeviceID枚举中命名的元素。问题是编译器没有看到该枚举的声明。在 .h 文件中的某处,您应该有该声明。导入文件应该可以修复它。

于 2012-06-20T11:32:10.413 回答