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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - distagon35

Pages: [1]
1
General / Re: Linker error I don't understand
« on: January 01, 2018, 11:12:31 am »
And so I'm going to learn CMake. Fortunately there is a tutorial in the "getting started" section of SFML.
Oh, I like coding, but I hate all the configuration und installation work. Nevertheless thanks and a happy new year.

distagon35

2
General / Re: Linker error I don't understand
« on: December 31, 2017, 05:28:52 pm »
Ok, I've installed TDM with gcc 4.9.2 and the SFML version 2.4.2.
Just the same error message.  3 different calls of "loadFromFile", and all don't work.

Code: [Select]
        if (!backgroundTexture.loadFromFile("background.jpg"))
            return EXIT_FAILURE;

        if (!font.loadFromFile("sansation.ttf"))
            return EXIT_FAILURE;

        if (!texture.loadFromFile("texture.jpg"))
            return EXIT_FAILURE;

BTW: I don't believe that these errors depend on a wrong version. On Linux I use Codeblocks 16.01 together with SFML 2.3.2 (because it's in the Ubuntu repository), and - as I said - it works well.


3
General / Linker error I don't understand
« on: December 31, 2017, 11:24:19 am »
Hello,
unable to compile the "opengl" example of SFML.


Windows 7,
SFML 2.3.2 - 32 bit,
TDM with gcc 4.8.1
Codeblocks 16.01

I followed exactly the instructions on the SFML tutorial page. All needed files are availabe, and I think codeblocks is well configured. The first example of the tutorial compiles and runs fine, the SFML example "window" too. But trying to compile the example "opengl" I get the error messages below. Just the lines where some ressources have to be loaded.

Code: [Select]
-------------- Build: Debug in SFML01 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g -IE:\Projekte\Codeblocks\include -c E:\Projekte\Codeblocks\SFML01\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LE:\Projekte\Codeblocks\lib -o bin\Debug\SFML01.exe obj\Debug\main.o   -lopengl32 -lsfml-audio-d -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
obj\Debug\main.o: In function `main':
E:/Projekte/Codeblocks/SFML01/main.cpp:27: undefined reference to `_imp___ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'
E:/Projekte/Codeblocks/SFML01/main.cpp:33: undefined reference to `_imp___ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
E:/Projekte/Codeblocks/SFML01/main.cpp:52: undefined reference to `_imp___ZN2sf5Image12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
4 error(s), 0 warning(s) (0 minute(s), 0 second(s))

The same errors I got by trying other combinations of SFML and gcc. On Linux this example works without any troubles.





Pages: [1]
anything