SFML community forums
Help => General => Topic started by: Neomex 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.
-
Remove -lSDL_image from your linker options if you're not using it anymore.
-
Where can I find it?
Project->build options->linker settings
other linker options is empty
-
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.
-
Done, but there still are errors.
code
////////////////////////////////////////////////////////////
// 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
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 ===|
-
Add -lsfml-window.
-
Ok, now everything works.
Thanks a lot :)