简体   繁体   English

系统查找错误未定义符号SFML

[英]system lookup error undefined symbol SFML

I am running Linux Mint 12 on an i686. 我在i686上运行Linux Mint 12。

I am running a program that uses SFML. 我正在运行一个使用SFML的程序。 I compile and run it as such: 我这样编译并运行它:

    g++ -c lineTest.cpp Rasterizer.cpp simpleCanvas.cpp
    g++ -o lineTest lineTest.o Rasterizer.o simpleCanvas.o -lsfml-graphics -lsfml-window -lsfml-system

After when I try to run the program lineTest, I get the following error: 当我尝试运行程序lineTest之后,出现以下错误:

$ ./lineTest
./lineTest: symbol lookup error: /usr/local/lib/libsfml-window.so.1.6: undefined 
symbol: _ZN2sf7Unicode11UTF8OffsetsE

I'm not using any IDE, just running everything from the command line. 我没有使用任何IDE,只是从命令行运行所有内容。 Does anyone know what I can do to get rid of the error and get the program to run? 有谁知道我该怎么做才能消除错误并使程序运行?

If I had to guess I would say you have sfml in both /usr/lib and /usr/local/lib. 如果我不得不猜测,我会说您在/ usr / lib和/ usr / local / lib中都有sfml。 Decoding the mangled name: 解码变形的名称:

> c++filt _ZN2sf7Unicode11UTF8OffsetsE
sf::Unicode::UTF8Offsets

so, libsfml-window.so looks for the sf::Unicode::UTF8Offsets function but cannot find it. 因此,libsfml-window.so查找sf::Unicode::UTF8Offsets函数,但找不到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM