eclipse vc++上的SFML链接器问题



我正在尝试在我的项目中使用SFML音频库。

我正在开发eclipse juno的c++和使用SFML v1.6。

我将sfml-audio-d.lib, sfml-main-d.libsfml-system-d.lib加入

C/C++ General > paths and symbols>libraries

我还定义了一个名为SFML_DYNAMIC的宏到

C/C++ Build>Settings>C++ Compiler>Preprocessor ' definitions/D' section

我将包含所有dll的目录添加到PATH环境变量中。

在我的代码中,我使用sf::SoundBuffer,但是当我试图构建项目时,我得到以下链接器错误:

Chunk.obj : error LNK2001: unresolved external symbol "private: static class sf::SoundBuffer * Chunk::breakBlockSound" (?breakBlockSound@Chunk@@0PAVSoundBuffer@sf@@A) MyProject.exe : fatal error LNK1120: 1 unresolved externals

在使用它之前必须在VS2010中重建项目。现在工作。

最新更新