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 - luitzen

Pages: [1]
1
General / Re: Can't get SFML working in Code::Blocks
« on: February 02, 2018, 03:11:57 pm »
Which DLL files do I need to copy from the compiler folder and which one can I leave out?

2
General / Re: Can't get SFML working in Code::Blocks
« on: January 30, 2018, 12:07:12 pm »
Thanks, it's working now.

I did not find the mentioned instructions in the tutorial though, so I copied all dlls. Could you give a link to a tutorial that gives more information on that topic?

3
General / Re: Can't get SFML working in Code::Blocks
« on: January 30, 2018, 01:17:42 am »
Since I was moving around different versions of SFML I realized that might cause a problem. So what I did is I went to the install directory of SFML again and copied the dlls from the bin directory there.

Running the exe from Code::Blocks seems to work though.

4
General / Re: Can't get SFML working in Code::Blocks
« on: January 30, 2018, 12:39:09 am »
I used the SJLJ version (64-bit), but then I tried the 32 bit version and it did work. I compiled the source, copied the dlls to the folder with the exe, but when I try to execute the exe I get the error message "Cannot find access point of Procedure _ZSt24_throw_out_of_range_fmtPKcz in DLL file (path)\sfml_system-2.dll" (translated from Dutch).

5
General / Can't get SFML working in Code::Blocks
« on: January 29, 2018, 10:31:32 pm »
I can't get SFML working in Code::Blocks.

I'm using Code::Blocks 16.01. I used the tutorial (https://www.sfml-dev.org/tutorials/2.4/start-cb.php).

Installation directory: C:\SFML-2.4.2

Project >> Build Options has:
- Project name:
-- Search directories >> Compiler: C:\SFML-2.4.2\include
-- Search directories >> Linker: C:\SFML-2.4.2\lib
- Debug:
-- Linker settings:
--- sfml-graphics-d
--- sfml-window-d
--- sfml-system-d
- Release:
-- Linker settings:
--- sfml-graphics
--- sfml-window
--- sfml-system

I used the following test code (how do I format code on this forum?):

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

When I try to build the project, I get the following errors:
-------------- Build: Release in First SFML (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LC:\SFML-2.4.2\lib -o "bin\Release\First SFML.exe" obj\Release\main.o  -s  -lsfml-graphics -lsfml-window -lsfml-system
obj\Release\main.o:main.cpp:(.text.startup+0xc5): undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
obj\Release\main.o:main.cpp:(.text.startup+0xf5): undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
obj\Release\main.o:main.cpp:(.text.startup+0xed): undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
obj\Release\main.o:main.cpp:(.text.startup+0x12e): undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'
obj\Release\main.o:main.cpp:(.text.startup+0x133): undefined reference to `_imp___ZN2sf5Color5GreenE'
obj\Release\main.o:main.cpp:(.text.startup+0x14f): undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'
obj\Release\main.o:main.cpp:(.text.startup+0x172): undefined reference to `_imp___ZNK2sf6Window6isOpenEv'
obj\Release\main.o:main.cpp:(.text.startup+0x1a9): undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
obj\Release\main.o:main.cpp:(.text.startup+0x1db): undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
obj\Release\main.o:main.cpp:(.text.startup+0x1f3): undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
obj\Release\main.o:main.cpp:(.text.startup+0x1f8): undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
obj\Release\main.o:main.cpp:(.text.startup+0x214): undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
obj\Release\main.o:main.cpp:(.text.startup+0x223): undefined reference to `_imp___ZN2sf6Window7displayEv'
obj\Release\main.o:main.cpp:(.text.startup+0x242): undefined reference to `_imp___ZN2sf6Window5closeEv'
obj\Release\main.o:main.cpp:(.text.startup+0x24c): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
obj\Release\main.o:main.cpp:(.text.startup+0x274): undefined reference to `_imp___ZN2sf5ShapeD2Ev'
obj\Release\main.o:main.cpp:(.text.startup+0x28a): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
obj\Release\main.o:main.cpp:(.text.startup+0x302): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
obj\Release\main.o:main.cpp:(.text.startup+0x32a): undefined reference to `_imp___ZN2sf5ShapeD2Ev'
obj\Release\main.o:main.cpp:(.text.startup+0x340): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
21 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Pages: [1]