SFML-Code::Blocks- błędy linkera, mimo prawidłowego zlinkowania

0

Ostatnio postanowiłem nauczyć się SFML, kiedy kompiluję jednak kod testowy kompilator wyrzuca mi dobre kilkadziesiąt błędów, o których wiem, że są błędami linkowania:

Instalowałem SFML 2.3.2, Code::Blocks używany przeze mnie to 16.01, system Windows 8.1 64 bit.

Projekt konfigurowałem zgodnie z tym: http://www.sfml-dev.org/tutorials/2.3/start-cb.php
Chciałem zrobić linkowanie statyczne, w #defines dopisałem SFML_STATIC

== Build: Debug in NEXT (compiler: GNU GCC Compiler) ===

obj\Debug\main.o||In function main':| C:\Users\Andrij\Documents\NEXT\main.cpp|5|undefined reference to _imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Users\Andrij\Documents\NEXT\main.cpp|5|undefined reference to _imp___ZN2sf9VideoModeC1Ejjj'| C:\Users\Andrij\Documents\NEXT\main.cpp|5|undefined reference to _imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Users\Andrij\Documents\NEXT\main.cpp|6|undefined reference to _imp___ZN2sf11CircleShapeC1Efj'| C:\Users\Andrij\Documents\NEXT\main.cpp|7|undefined reference to _imp___ZN2sf5Color5GreenE'|
C:\Users\Andrij\Documents\NEXT\main.cpp|7|undefined reference to _imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'| C:\Users\Andrij\Documents\NEXT\main.cpp|15|undefined reference to _imp___ZN2sf6Window5closeEv'|
C:\Users\Andrij\Documents\NEXT\main.cpp|12|undefined reference to _imp___ZN2sf6Window9pollEventERNS_5EventE'| C:\Users\Andrij\Documents\NEXT\main.cpp|18|undefined reference to _imp___ZN2sf5ColorC1Ehhhh'|
C:\Users\Andrij\Documents\NEXT\main.cpp|18|undefined reference to _imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'| C:\Users\Andrij\Documents\NEXT\main.cpp|19|undefined reference to _imp___ZN2sf12RenderStates7DefaultE'|
C:\Users\Andrij\Documents\NEXT\main.cpp|19|undefined reference to _imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'| C:\Users\Andrij\Documents\NEXT\main.cpp|20|undefined reference to _imp___ZN2sf6Window7displayEv'|
C:\Users\Andrij\Documents\NEXT\main.cpp|9|undefined reference to _imp___ZNK2sf6Window6isOpenEv'| C:\Users\Andrij\Documents\NEXT\main.cpp|23|undefined reference to _imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\Andrij\Documents\NEXT\main.cpp|23|undefined reference to _imp___ZN2sf12RenderWindowD1Ev'| obj\Debug\main.o||In function ZN2sf11CircleShapeD1Ev':|
C:\Users\Andrij\Documents\NEXT........\Program Files (x86)\CodeBlocks\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to _imp___ZTVN2sf11CircleShapeE'| C:\Users\Andrij\Documents\NEXT\..\..\..\..\Program Files (x86)\CodeBlocks\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to _imp___ZTVN2sf11CircleShapeE'|
C:\Users\Andrij\Documents\NEXT........\Program Files (x86)\CodeBlocks\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
error: ld returned 1 exit status
== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===

Biblioteki mam zlinkowane w tej kolejności:
Debug:
sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d
opengl32
winmm
gdi32

Release:
sfml-graphics-s
sfml-window-s
sfml-system-s
opengl32
winmm
gdi32

Ktoś wie co z tym nie tak?

0

to nie sa bledy linkowania a bledy kompilatora. Moze brakuje Ci jakiegos include?

0

mam jedynie #include<SFML/Graphics.hpp>, zresztą może po prostu wstawię kod:

#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Green);

while (window.isOpen())
{
    sf::Event event;
    while (window.pollEvent(event))
    {
        if (event.type == sf::Event::Closed)
            window.close();
    }

    window.clear();
    window.draw(shape);
    window.display();
}

return 0;

}

0

Kompilator C++ jest case-sensitive.

#include <SFML/Graphics.hpp>

1 użytkowników online, w tym zalogowanych: 0, gości: 1