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

Author Topic: Code::Blocks-Need help with dependencies SOLVED  (Read 1324 times)

0 Members and 1 Guest are viewing this topic.

Buda

  • Newbie
  • *
  • Posts: 1
    • View Profile
Code::Blocks-Need help with dependencies SOLVED
« on: April 30, 2015, 04:28:54 am »
Im using SFML 2.2 and Code;;Blocks 13.12.
Windows 7

||=== Build: Debug in Pang (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\CodeBlocks\Projects\Pang\main.cpp|5|undefined reference to `sf::String::String(char const*, std::locale const&)'
|
C:\CodeBlocks\Projects\Pang\main.cpp|5|undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
C:\CodeBlocks\Projects\Pang\main.cpp|5|undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
|
C:\CodeBlocks\Projects\Pang\main.cpp|6|undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'|
C:\CodeBlocks\Projects\Pang\main.cpp|7|undefined reference to `sf::Color::Green'
|
C:\CodeBlocks\Projects\Pang\main.cpp|7|undefined reference to `sf::Shape::setFillColor(sf::Color const&)'|
C:\CodeBlocks\Projects\Pang\main.cpp|15|undefined reference to `sf::Window::close()'
|
C:\CodeBlocks\Projects\Pang\main.cpp|12|undefined reference to `sf::Window::pollEvent(sf::Event&)'|
C:\CodeBlocks\Projects\Pang\main.cpp|18|undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
|
C:\CodeBlocks\Projects\Pang\main.cpp|18|undefined reference to `sf::RenderTarget::clear(sf::Color const&)'|
C:\CodeBlocks\Projects\Pang\main.cpp|19|undefined reference to `sf::RenderStates::Default'
|
C:\CodeBlocks\Projects\Pang\main.cpp|19|undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'|
C:\CodeBlocks\Projects\Pang\main.cpp|20|undefined reference to `sf::Window::display()'
|
C:\CodeBlocks\Projects\Pang\main.cpp|9|undefined reference to `sf::Window::isOpen() const'|
C:\CodeBlocks\Projects\Pang\main.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'
|
C:\CodeBlocks\Projects\Pang\main.cpp|5|undefined reference to `sf::RenderWindow::~RenderWindow()'|
C:\CodeBlocks\Projects\Pang\main.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'
|
obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\CodeBlocks\Projects\Pang\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'
|
C:\CodeBlocks\Projects\Pang\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
C:\CodeBlocks\Projects\Pang\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `sf::Shape::~Shape()'
|
||=== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
 

Thats my error log.

I know its with the dependencies but I really need this explained. I know I'm supposed to have things like winmm but I can't find it, and I don't understand the whole ordering ordeal.
Edit - After looking around, I found that I don't even have the dependencies I need. I'm so lost its not even funny and yes I have followed the tutorial 1:1
« Last Edit: April 30, 2015, 06:32:14 am by Buda »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Code::Blocks-Need help with dependencies SOLVED
« Reply #1 on: April 30, 2015, 09:44:33 am »
The errors currently only show that you're not linking against the SFML libs properly.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kebab85

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Code::Blocks-Need help with dependencies SOLVED
« Reply #2 on: May 04, 2015, 04:07:31 am »
Im always getting the same problem when i try to set up Sfml with codeblocks following the tutorial provided on this site.

During all the time ive used Sfml i use old projects every time i want to make something new becouse i seriously dont get what im doing wrong.


In the projects i have that works theres alot more settings done than showed in the tutorial for some reason.
Getting Sfml to work took me days and days browsing the web.

I wish to learn how its done for real so i can do this in the future and i also want to get a better understanding so i can fix the problems that occur my self.

Usually i get so demotived to code due this so i go to my Linux laptop and use old Sfml instead hehe.

If anyone have the time to explain everything indepth im all ears.
We can take this outside this forum if you want.

Im tierd of failing and i want to learn.

/Kebab

 

anything