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

Author Topic: Code::Blocks, Can't compile project.  (Read 2840 times)

0 Members and 1 Guest are viewing this topic.

Neomex

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Code::Blocks, Can't compile project.
« on: March 15, 2010, 09:26:04 am »
Hello,
I've everything done like in tutorial, but still there's an error:

ld.exe||cannot find -lSDL_image|
||=== Build finished: 1 errors, 0 warnings ===|

I was using SDL before.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Code::Blocks, Can't compile project.
« Reply #1 on: March 15, 2010, 09:53:57 am »
Remove -lSDL_image from your linker options if you're not using it anymore.
Laurent Gomila - SFML developer

Neomex

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Code::Blocks, Can't compile project.
« Reply #2 on: March 15, 2010, 10:05:46 am »
Where can I find it?
Project->build options->linker settings
other linker options is empty

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Code::Blocks, Can't compile project.
« Reply #3 on: March 15, 2010, 10:58:12 am »
It should be at the same location where you link SFML libraries. Don't forget to check the global linker settings as well as the configurations' (release, debug) ones.
Laurent Gomila - SFML developer

Neomex

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Code::Blocks, Can't compile project.
« Reply #4 on: March 15, 2010, 12:57:03 pm »
Done, but there still are errors.
code
Code: [Select]



////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}


errors

Code: [Select]

obj\Debug\abc.o||In function `main':|
C:\Users\Olek\Desktop\sfml\testt\abc.cpp|18|undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
C:\Users\Olek\Desktop\sfml\testt\abc.cpp|18|undefined reference to `sf::Window::Window(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&)'|
C:\Users\Olek\Desktop\sfml\testt\abc.cpp|24|undefined reference to `sf::Window::Display()'|
C:\Users\Olek\Desktop\sfml\testt\abc.cpp|27|undefined reference to `sf::Window::~Window()'|
C:\Users\Olek\Desktop\sfml\testt\abc.cpp|27|undefined reference to `sf::Window::~Window()'|
||=== Build finished: 5 errors, 0 warnings ===|

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Code::Blocks, Can't compile project.
« Reply #5 on: March 15, 2010, 01:27:39 pm »
Add -lsfml-window.
Laurent Gomila - SFML developer

Neomex

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Code::Blocks, Can't compile project.
« Reply #6 on: March 15, 2010, 03:26:12 pm »
Ok, now everything works.
Thanks a lot :)

 

anything