我收到一个链接器错误,我不理解 VC++ 和 FLTK
I'm getting a linker error I don't understand with VC++ and FLTK
我正在尝试用FLTK和vc++ 2010创建一个新项目。我有段时间没这么做了。我尽可能地根据记忆设置属性。我得到一个链接错误。谁能告诉我怎么解决这个问题?
1>------ Build started: Project: BJST chap 14 ex 1a, Configuration: Debug Win32 ------
1> BJST chap 14 ex 1.cpp
1>c:usersbryandocumentsvisual studio 2010projectsbjst chap 14 ex 1abjst chap 14 ex 1abjst chap 14 ex 1.cpp(10): error C2065: 'FL_Window' : undeclared identifier
1>c:usersbryandocumentsvisual studio 2010projectsbjst chap 14 ex 1abjst chap 14 ex 1abjst chap 14 ex 1.cpp(10): error C2146: syntax error : missing ';' before identifier 'window'
1>c:usersbryandocumentsvisual studio 2010projectsbjst chap 14 ex 1abjst chap 14 ex 1abjst chap 14 ex 1.cpp(10): error C3861: 'window': identifier not found
1>c:usersbryandocumentsvisual studio 2010projectsbjst chap 14 ex 1abjst chap 14 ex 1abjst chap 14 ex 1.cpp(12): error C2065: 'FL_Box' : undeclared identifier
1>c:usersbryandocumentsvisual studio 2010projectsbjst chap 14 ex 1abjst chap 14 ex 1abjst chap 14 ex 1.cpp(12): error C2146: syntax error : missing ';' before identifier 'box'
1>c:usersbryandocumentsvisual studio 2010projectsbjst chap 14 ex 1abjst chap 14 ex 1abjst chap 14 ex 1.cpp(12): error C3861: 'box': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
#include <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Window.H>
int main ()
{
FL_Window window(200, 200, "window title");
FL_Box box();
return 0;
}
此错误信息
错误C2065: 'FL_Window':未声明的标识符
表示编译器没有找到标识符FL_Window
的声明。只要输入正确,这个名称就有可能(我认为确实如此)在某个名称空间中声明。检查头文件<FL/Fl_Window.H>
是否在某个命名空间中声明了这个名称。在这种情况下,你至少要写为
TheNameSpace::FL_Window window(200, 200, "window title");
where代替TheNameSpace
,写名称FL_Window
所在的命名空间
标识符FL_Box
相关文章:
- 不理解为什么代码没有产生所需的答案
- 试图修复一个错误,该错误不会让我开始编程其余部分
- C++我不理解的行为
- 使用 std::iterator_traits<> 时编译时错误不明确
- Visual Studio代码不理解CMake-DDEBUG
- 不理解此递归函数中的返回 (C++)
- 错误:不支持 GLSL 3.30.支持的版本包括:1.10、1.20、1.30、1.00 ES、3.00 ES、3.10
- 不理解将 .pb 转换为 ff-lite 时的平均值和标准开发值
- 数组错误(不允许类型不完整)
- 不理解给定代码的输出
- wxWidgets 运行时错误(不匹配版本)
- 合成错误不知道为什么会发生这种情况,请检查一下并告诉我这是我的编码还是视觉工作室
- Travis CI 中奇怪的编译器错误不会在本地计算机上发生
- 对分段错误的理解不正确
- 不理解 VS 中 HelloWorld 的错误,当包含std_lib来自 Stroustrup 的书时
- 不理解我收到的错误消息
- 不理解此错误消息
- 不理解升压错误代码
- 我试图使用 GLUT 制作一个窗口来使用 OpenGL,但它给了我不理解的错误
- 我收到一个链接器错误,我不理解 VC++ 和 FLTK