Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Help with setting up Code::Blocks project  (Read 1348 times)

0 Members and 1 Guest are viewing this topic.

Mahi

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Help with setting up Code::Blocks project
« on: May 14, 2017, 12:45:54 pm »
I've been trying to create an SFML project on Code::Blocks for the whole day now, and I'm really out of ideas, been researching the internet for a lot. I keep getting some error, regardless of how I tune the settings. Here's the errors I'm currently getting (there are 42 lines exactly, they're all similar but different reference):

D:\SFML-2.4.2\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glClearColor@16'|
D:\SFML-2.4.2\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|

Here are the versions I have currently downloaded:

Code::Blocks 16.01
http://www.codeblocks.org/downloads/26
Windows
codeblocks-16.01mingw-setup.exe

SFML 2.4.2
https://www.sfml-dev.org/download/sfml/2.4.2/
Windows
GCC 4.9.2 TDM (SJLJ) - 32-bit

I originally tried the MinGW SFML version, but it gave some linker errors, and I read somewhere that you're supposed to use the TDM (SJLJ) version instead.

Here are my project's current settings:

Search directories (Global)


#defines (Global)


Linker settings (Debug)


Linker settings (Release)


I've tried messing around with the order and stuff, nothing seems to work  :-\ any ideas?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Help with setting up Code::Blocks project
« Reply #1 on: May 14, 2017, 03:24:11 pm »
As the official and up-to-date SFML tutorial states, you need to link SFML's dependencies when linking statically against SFML.
The tutorial also contains the list of the dependencies for Windows and the correct order.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything