User forums > General (but related to Code::Blocks)
Problem with SFML 2.0 libraries
Qday:
--- Quote from: stahta01 on July 02, 2024, 04:18:25 am ---That is the build log I was asking for.
Are you now using an Compiler that is compatible with the library? What compiler are you using?
Because I did not see a build error. Are you having a run-time problem?
Tim S.
--- End quote ---
I just reinstaled my whole system. I'll try running SFML now. Gonna let you know how it goes later today. :)
Qday:
--- Quote from: Qday on July 02, 2024, 06:28:00 am ---
--- Quote from: stahta01 on July 02, 2024, 04:18:25 am ---That is the build log I was asking for.
Are you now using an Compiler that is compatible with the library? What compiler are you using?
Because I did not see a build error. Are you having a run-time problem?
Tim S.
--- End quote ---
I just reinstaled my whole system. I'll try running SFML now. Gonna let you know how it goes later today. :)
--- End quote ---
Yea, so after formating my PC and doing everything from scratch im still having the same problem...
Im using MinGW-w64 compiler. On CB 20.03, Windows 11
SFML 2.6.1, GCC 13.1.0 MinGW (SEH) - 64-bit
--- Code: ---C:\Windows\System32>gcc --version
gcc (Rev3, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Windows\System32>g++ --version
g++ (Rev3, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Windows\System32>gdb --version
GNU gdb (GDB) 14.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--- End code ---
This is the code im trying to run:
--- Code: ---#include <SFML/Graphics.hpp>
#include <cmath>
int main()
{
sf::RenderWindow okno( sf::VideoMode( 320, 240 ), "Kurs SFML 2.0 - http://cpp0x.pl" );
sf::Clock stoper;
while( okno.isOpen() )
{
sf::Event event;
while( okno.pollEvent( event ) )
{
if( event.type == sf::Event::Closed )
okno.close();
} //while
okno.clear();
sf::CircleShape ksztalt( std::sin( stoper.getElapsedTime().asSeconds() ) * okno.getSize().y / 8 + okno.getSize().y / 4 );
ksztalt.setOrigin( sf::Vector2f( ksztalt.getRadius(), ksztalt.getRadius() ) );
ksztalt.setPosition( okno.getSize().x / 2.0f, okno.getSize().y / 2.0f );
ksztalt.setFillColor( sf::Color::Yellow );
okno.draw( ksztalt );
okno.display();
} //while
return 0;
}
--- End code ---
Build logs:
--- Code: ----------------- Clean: Debug in SFML_Project_01 (compiler: GNU GCC Compiler)---------------
Cleaned "SFML_Project_01 - Debug"
-------------- Build: Debug in SFML_Project_01 (compiler: GNU GCC Compiler)---------------
g++.exe -Wall -g -IC:\Dev\SFML-2.6.1\include -c D:\CPP\SFML_Project_01\main.cpp -o obj\Debug\main.o
g++.exe -LC:\Dev\SFML-2.6.1\lib -o bin\Debug\SFML_Project_01.exe obj\Debug\main.o -static -static-libgcc -static-libstdc++ -lsfml-audio-d -lsfml-graphics-d -lsfml-main-d -lsfml-network-d -lsfml-system-d -lsfml-window-d -mwindows
Output file is bin\Debug\SFML_Project_01.exe with size 2.37 MB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
--- End code ---
And I did EVERYTHING that this(https://cpp0x.pl/kursy/Kurs-SFML-2-x-C++/Instalacja-i-konfiguracja/Konfiguracja-SFML-2-0-Code-Blocks/464) tutorial said to do.
My dll files are next to .exe file of my program.
My program is building right but can't run... Error i've got is in the attachments.
stahta01:
So, you have no reason to believe the compiler and library are compatible with each other!
Do you just wish to waste your time because I no longer plan to waste my time, goodbye!
Edit: If you wish to stop using the non compatible library and instead use the MSys2 MinGW library I am willing to help; but, continuing to waste time will result in me deciding you are an Help Vampire or a newbie unable to learn!
Tim S.
Qday:
--- Quote from: stahta01 on July 02, 2024, 02:31:50 pm ---So, you have no reason to believe the compiler and library are compatible with each other!
Do you just wish to waste your time because I no longer plan to waste my time, goodbye!
Edit: If you wish to stop using the non compatible library and instead use the MSys2 MinGW library I am willing to help; but, continuing to waste time will result in me deciding you are an Help Vampire or a newbie unable to learn!
Tim S.
--- End quote ---
Ofcourse I wish to "stop using the non compatible library" and im trying. For sure im not here to waste ur time. And im willing to learn.
Im searching for a solution right now.
stahta01:
So, install SFML under the MSys2 environment you are using and change the CB project to use the library.
Which MSys2 environment you are using? I will try to create an CB Project.
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version