Author Topic: Problem with SFML 2.0 libraries  (Read 12240 times)

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Problem with SFML 2.0 libraries
« on: May 27, 2024, 06:18:17 am »
Hi, im trying to learn SFML2.0 with this tutorial: https://cpp0x.pl/kursy/Kurs-SFML-2-x-C++/460 (its in polish) and i cant get to it to work. Tried with empty project and with SFML wizard build in CodeBlocks.

tried with SFML 2.0 GCC 4.7 MinGW (DW2) - 32-bit and SFML 2.0 GCC 4.7 TDM (SJLJ) - 32-bit but still getting the same error message.

I have tried changing names of the libraries( deleting .a and "lib" but it doesnt work :(

screanshoots in the zip.

||=== Build: Debug in SFML_04 (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsfml-graphics-d: No such file or directory|
ld.exe||cannot find -lsfml-window-d: No such file or directory|
ld.exe||cannot find -lsfml-system-d: No such file or directory|
||error: ld returned 1 exit status|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|




-------------- Build: Debug in SFML_04 (compiler: GNU GCC Compiler)---------------

g++.exe -LC:\Dev\SFML-2.0\lib -o bin\Debug\SFML_04.exe obj\Debug\main.o   -lmingw32 -luser32 -lgdi32 -lwinmm -ldxguid -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib\libsfml-graphics-d.a when searching for -lsfml-graphics-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics-d: No such file or directory
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-window-d.a when searching for -lsfml-window-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib\libsfml-window-d.a when searching for -lsfml-window-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-window-d.a when searching for -lsfml-window-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-window-d: No such file or directory
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-window-d.a when searching for -lsfml-window-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-system-d.a when searching for -lsfml-system-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib\libsfml-system-d.a when searching for -lsfml-system-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-system-d.a when searching for -lsfml-system-d
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system-d: No such file or directory
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Dev\SFML-2.0\lib/libsfml-system-d.a when searching for -lsfml-system-d
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
4 error(s), 0 warning(s) (0 minute(s), 1 second(s))
 



Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Re: Problem with SFML 2.0 libraries
« Reply #1 on: May 27, 2024, 11:21:07 am »
You are mixing 64 and 32-bit objects, or SFML was compiled with a different compiler.

Offline nenin

  • Almost regular
  • **
  • Posts: 228
Re: Problem with SFML 2.0 libraries
« Reply #2 on: May 27, 2024, 04:18:04 pm »
Hi, im trying to learn SFML2.0 with this tutorial:
4 error(s), 0 warning(s) (0 minute(s), 1 second(s))
You probably have to try this "GCC 13.1.0 MinGW (SEH) - 64-bit" from here  https://www.sfml-dev.org/download/sfml/2.6.1/  or check msys for  SFML2.
Versions you tried are totally outdated.

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #3 on: June 04, 2024, 02:39:26 pm »
Quote
You probably have to try this "GCC 13.1.0 MinGW (SEH) - 64-bit" from here  https://www.sfml-dev.org/download/sfml/2.6.1/  or check msys for  SFML2.
Versions you tried are totally outdated.

Thanks, it worked but now i have a diffrent problem :( maybe u can help me with this one to ?

Offline nenin

  • Almost regular
  • **
  • Posts: 228
Re: Problem with SFML 2.0 libraries
« Reply #4 on: June 04, 2024, 02:57:24 pm »
Quote
You probably have to try this "GCC 13.1.0 MinGW (SEH) - 64-bit" from here  https://www.sfml-dev.org/download/sfml/2.6.1/  or check msys for  SFML2.
Versions you tried are totally outdated.

Thanks, it worked but now i have a diffrent problem :( maybe u can help me with this one to ?
How did you link this DLL? Directly or using *.a file?

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #5 on: June 04, 2024, 03:58:34 pm »
Quote
How did you link this DLL? Directly or using *.a file?

I dont know the terminology but the dll is in the same folder as my .exe file

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #6 on: June 04, 2024, 06:23:45 pm »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nenin

  • Almost regular
  • **
  • Posts: 228
Re: Problem with SFML 2.0 libraries
« Reply #7 on: June 05, 2024, 07:40:09 am »
Quote
How did you link this DLL? Directly or using *.a file?

I dont know the terminology but the dll is in the same folder as my .exe file
exe found dll, but dll did not provide required function. It means that you linked incorrect dll. Linking of the dll can be done in few manners for mingw gcc:
1. Static using interface lib with extension *.a
2. Static using dll by itself (from my experience  it is better)
3. Dynamic by call dll and function from the code.
Something is wrong in your case.

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #8 on: July 02, 2024, 03:45:01 am »
Post the current full re-build log.
Edit: Add link to FAQ https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Tim S.
Sorry for the late response. I hope you can still help me .

Code
-------------- Clean: Debug in SFML_01 (compiler: GNU GCC Compiler)---------------

Cleaned "SFML_01 - Debug"

-------------- Build: Debug in SFML_01 (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -g -IC:\Dev\SFML-2.6.1\include -c D:\CPP\SFML_01\main.cpp -o obj\Debug\main.o
g++.exe -LC:\Dev\SFML-2.6.1\lib -o bin\Debug\SFML_01.exe obj\Debug\main.o  -static -static-libgcc  -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_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))
Build log saved as:
file://D:/CPP/SFML_01/SFML_01_build_log.html



Is it what you were asking for?


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #9 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.

« Last Edit: July 02, 2024, 04:21:30 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #10 on: July 02, 2024, 06:28:00 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.

I just reinstaled my whole system. I'll try running SFML now. Gonna let you know how it goes later today. :) 

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #11 on: July 02, 2024, 02:23:30 pm »
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.

I just reinstaled my whole system. I'll try running SFML now. Gonna let you know how it goes later today. :)


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.


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;
}
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))


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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #12 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.

« Last Edit: July 02, 2024, 03:13:14 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #13 on: July 02, 2024, 03:36:23 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.

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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #14 on: July 02, 2024, 04:09:13 pm »
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #15 on: July 02, 2024, 04:17:43 pm »
Zipped project attached.

Edit: I thought I created a SFML project in the recent past; and, I found it.

Tim S.

« Last Edit: July 02, 2024, 04:20:01 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #16 on: July 02, 2024, 04:27:24 pm »
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.

GNU bash, version 5.2.21(1)-release (x86_64-pc-msys) / msys2-x86_64-20240113

I instaled the SFML from (https://packages.msys2.org/package/mingw-w64-x86_64-sfml?repo=mingw64)
using "pacman -S mingw-w64-x86_64-sfml" .

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #17 on: July 02, 2024, 05:21:33 pm »
So, download the demo project I zipped up and configure Code::Blocks to use MINGW64 MSys2 GCC and build and run the project.

It worked for me under UCRT64 with package mingw-w64-ucrt-x86_64-sfml installed.

Edit: You do know what an MSYS2 environment is, correct? Example: MINGW64, MINGW32, UCRT64, and etc.

Tim S.
« Last Edit: July 02, 2024, 10:42:59 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #18 on: July 03, 2024, 02:56:58 am »
So, download the demo project I zipped up and configure Code::Blocks to use MINGW64 MSys2 GCC and build and run the project.

It worked for me under UCRT64 with package mingw-w64-ucrt-x86_64-sfml installed.

Edit: You do know what an MSYS2 environment is, correct? Example: MINGW64, MINGW32, UCRT64, and etc.

Tim S.

I read some things and now I know what mysys enviroments are but still, I cant use them. Its hard for me to find any usefull documentary or tutorials on how to do it.

I tried just config CB to use mingw-w64-ucrt-x86_64-sfml libraries but i get an error that i cant make sens off. Im sorry if im being anoying but i just wanna play with SFML and write some code. And here I am trying to fix this f..  problem for 2 whole days.

Code
-------------- Clean: Debug_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

Cleaned "demo_sfml - Debug_shared"

-------------- Clean: Release_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

Cleaned "demo_sfml - Release_shared"

-------------- Clean: Debug_static in demo_sfml (compiler: GNU GCC Compiler)---------------

Cleaned "demo_sfml - Debug_static"

-------------- Clean: Release_static in demo_sfml (compiler: GNU GCC Compiler)---------------

Cleaned "demo_sfml - Release_static"

-------------- Build: Debug_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g -IC:\msys64\mingw64\include -c D:\CPP\testsfml2\main.cpp -o obj\Debug\main.o
g++.exe -LC:\msys64\mingw64\lib -o bin\Debug\testsfml.exe obj\Debug\main.o  -static-libgcc -static  -lsfml-window.dll -lsfml-graphics.dll -lsfml-system.dll -mwindows
Output file is bin\Debug\testsfml.exe with size 2.37 MB

-------------- Build: Release_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -O2 -IC:\msys64\mingw64\include -c D:\CPP\testsfml2\main.cpp -o obj\Release\main.o
g++.exe -LC:\msys64\mingw64\lib -o bin\Release\testsfml.exe obj\Release\main.o  -static-libgcc -static -s  -lsfml-window.dll -lsfml-graphics.dll -lsfml-system.dll -mwindows
Output file is bin\Release\testsfml.exe with size 758.50 KB

-------------- Build: Debug_static in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g -DSFML_STATIC -IC:\msys64\mingw64\include -c D:\CPP\testsfml2\main.cpp -o obj\Debug_static\main.o
g++.exe -LC:\msys64\mingw64\lib -o bin\Debug_static\testsfml.exe obj\Debug_static\main.o  -static-libgcc -static  -lsfml-main -lsfml-window-s -lsfml-graphics-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\mingw64\lib\libsfml-system-s.a(Err.cpp.obj):(.rdata+0x80): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekpos(std::fpos<int>, std::_Ios_Openmode)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 2 second(s))
2 error(s), 0 warning(s) (0 minute(s), 2 second(s))
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #19 on: July 03, 2024, 04:07:07 am »
Why did you add "-static-libgcc -static" these options?

Are you capable of learning? Why did you add all of the options incorrect options!

A list of clearly wrong options! NOTE: "-static-libgcc -static" likely is wrong; but, might be okay.
Code
-LC:\msys64\mingw64\lib

Tim S.
« Last Edit: July 03, 2024, 04:15:11 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #20 on: July 03, 2024, 04:10:25 am »
My build log of the project.
Code
-------------- Build: Debug_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Debug\main.o
g++.exe  -o bin\Debug\testsfml.exe obj\Debug\main.o   -lsfml-window.dll -lsfml-graphics.dll -lsfml-system.dll
Output file is bin\Debug\testsfml.exe with size 368.23 KB

-------------- Build: Release_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -O2  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Release\main.o
g++.exe  -o bin\Release\testsfml.exe obj\Release\main.o  -s  -lsfml-window.dll -lsfml-graphics.dll -lsfml-system.dll -mwindows
Output file is bin\Release\testsfml.exe with size 21.00 KB

-------------- Build: Debug_static in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g -DSFML_STATIC  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Debug_static\main.o
g++.exe  -o bin\Debug_static\testsfml.exe obj\Debug_static\main.o   -lsfml-main -lsfml-window-s -lsfml-graphics-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
Output file is bin\Debug_static\testsfml.exe with size 1.43 MB

-------------- Build: Release_static in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -O2 -DSFML_STATIC  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Release_static\main.o
g++.exe  -o bin\Release_static\testsfml.exe obj\Release_static\main.o   -lsfml-main -lsfml-window-s -lsfml-graphics-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -mwindows
Output file is bin\Release_static\testsfml.exe with size 1.21 MB
Process terminated with status 0 (0 minute(s), 5 second(s))
0 error(s), 0 warning(s) (0 minute(s), 5 second(s))
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Qday

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Problem with SFML 2.0 libraries
« Reply #21 on: July 03, 2024, 04:27:51 am »
My build log of the project.
Code
-------------- Build: Debug_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Debug\main.o
g++.exe  -o bin\Debug\testsfml.exe obj\Debug\main.o   -lsfml-window.dll -lsfml-graphics.dll -lsfml-system.dll
Output file is bin\Debug\testsfml.exe with size 368.23 KB

-------------- Build: Release_shared in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -O2  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Release\main.o
g++.exe  -o bin\Release\testsfml.exe obj\Release\main.o  -s  -lsfml-window.dll -lsfml-graphics.dll -lsfml-system.dll -mwindows
Output file is bin\Release\testsfml.exe with size 21.00 KB

-------------- Build: Debug_static in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g -DSFML_STATIC  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Debug_static\main.o
g++.exe  -o bin\Debug_static\testsfml.exe obj\Debug_static\main.o   -lsfml-main -lsfml-window-s -lsfml-graphics-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
Output file is bin\Debug_static\testsfml.exe with size 1.43 MB

-------------- Build: Release_static in demo_sfml (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -O2 -DSFML_STATIC  -c H:\devel\cb_projects\test\testsfml\main.cpp -o obj\Release_static\main.o
g++.exe  -o bin\Release_static\testsfml.exe obj\Release_static\main.o   -lsfml-main -lsfml-window-s -lsfml-graphics-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -mwindows
Output file is bin\Release_static\testsfml.exe with size 1.21 MB
Process terminated with status 0 (0 minute(s), 5 second(s))
0 error(s), 0 warning(s) (0 minute(s), 5 second(s))

Are you unable of teaching ?? U honestly did not help me at all with my problem. Just pointing out how dumb I am. I just wanted to learn how to code and u are the worst person i couldve talked too.

I just istaled VS c++ followed one simple guide and made it all work. Very much not thank you.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #22 on: July 03, 2024, 05:02:46 am »
Unable to answer questions! I still have no idea what MSys2 environment you are using; but, maybe you have no idea.

So, A help vampire or extreme newbie! Goodbye.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline everSome

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: Problem with SFML 2.0 libraries
« Reply #23 on: September 07, 2024, 01:10:17 pm »
If you are still using the ucrt environment of MSYS2, you can get their binary package of SFML via

pacman -S mingw-w64-ucrt-x86_64-sfml

Doing so currently will get you SFML 2.6.1
« Last Edit: September 07, 2024, 01:12:01 pm by everSome »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7668
    • My Best Post
Re: Problem with SFML 2.0 libraries
« Reply #24 on: September 07, 2024, 02:11:25 pm »
If you are still using the ucrt environment of MSYS2, you can get their binary package of SFML via

pacman -S mingw-w64-ucrt-x86_64-sfml

Doing so currently will get you SFML 2.6.1

That package name is for the UCRT64 environment.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline everSome

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: Problem with SFML 2.0 libraries
« Reply #25 on: September 13, 2024, 09:54:03 pm »
If you are still using the ucrt environment of MSYS2, you can get their binary package of SFML via

pacman -S mingw-w64-ucrt-x86_64-sfml

Doing so currently will get you SFML 2.6.1

That package name is for the UCRT64 environment.

Tim S.

Right you are! At one point in this thread, the originator showed a listing that indicated he was binding against the UCRT64 variant. However, he seems quite confused. That's why I prefaced my comment with "If you are still using ..."