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

Pages: [1]
1
General / Re: SFML for GCC 13.2.0
« on: November 06, 2024, 06:07:51 pm »
Yes, I am using the template form github.  I create a private repo of the SFML template, close it to my computer and then use the CMakeLists with no changes.   Then do  "cmake -B build -G "MinGW Makefiles"" then "cmake --build build" on the Windows 10 Command Prompt   It builds fine and ends with main.exe created.   And main pulls up a window with a moving bee - so it appears to work with cmake.  Hurrah!

But, what I am really trying to do is to build GCC 13.2.0 compatible SFML libraries to link into C++ programs using VS Code to compile and link.   I guess I need to do the step in the github template instructions that say to do the build with VS Code, but I do not know what the "project" would be to do it in VS Code.  Do you agree?   What file in the template would I use for the project file to build in VS Code?

2
General / Re: SFML for GCC 13.2.0
« on: November 06, 2024, 02:29:50 am »
Using your recommended command prompt entry (cmake -B build -G "MinGW Makefiles"), SFML 2.6.1 builds under 13.2.0 but with libraries scattered in multiple sub-directories.   And I am back to the same error I got with the 13.1.0 version of SFML 2.6.1.  Adn I have seen that multiple people are getting the "undefined reference to __imp__ZN2sf6StringC1EPKcRKSt6locale" and similar.   Below is the error readout from attempting to compile a simple C++ program using VS Code IDE.

C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\WINDOWS\TEMP\cchHTVoD.o: in function `main':
C:/Users/dbrya/projects/installation/SFML_main.cpp:5:(.text+0x83): undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:5:(.text+0xa7): undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:5:(.text+0xe8): undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:11:(.text+0x11f): undefined reference to `__imp__ZN2sf6Window5closeEv'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:9:(.text+0x133): undefined reference to `__imp__ZN2sf10WindowBase9pollEventERNS_5EventE'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:7:(.text+0x147): undefined reference to `__imp__ZNK2sf10WindowBase6isOpenEv'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:16:(.text+0x160): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/dbrya/projects/installation/SFML_main.cpp:16:(.text+0x1a8): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
collect2.exe: error: ld returned 1 exit status

3
General / Re: SFML for GCC 13.2.0
« on: November 05, 2024, 06:10:32 pm »
I cloned the SFML template onto my computer C: root directory.   But cannot get past line 2 of CmakeLists.txt.  I get

CMake Error at CMakeLists.txt:2 (project):
  Running

   'nmake' '-?'

  failed with:

   no such file or directory

Am I supposed to rename "project" in line 2 of CmakeLists.txt to the file folder that has the template.   

In FetchContent am I supposed to change GIT_REPOSITORY https://github.com/SFML/SFML.git to the folder on my computer?


4
General / Re: SFML for GCC 13.2.0
« on: November 04, 2024, 10:18:21 pm »
AT the link you passed, it shows the following.  But that does not appear to build a SFML compatible with my current C++ compiler (GCC 13.2.0).   I've been using the cmake gui to set configuration and then generate a MakeFile in my build directory.  I then use mingw32-make in the command prompt to build the compatible version of SFML.  Is this the right process?   Install Git and CMake. Use your system's package manager if available.

Follow GitHub's instructions for how to use their project template feature to create your own project.

Clone your new GitHub repo and open the repo in your text editor of choice.

Open CMakeLists.txt. Rename the project and the executable to whatever name you want.

If you want to add or remove any .cpp files, change the source files listed in the add_executable call in CMakeLists.txt to match the source files your project requires. If you plan on keeping the default main.cpp file then no changes are required.

If your code uses the Audio or Network modules then add sfml-audio or sfml-network to the target_link_libraries call alongside the existing sfml-graphics library that is being linked.

If you use Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:

sudo apt update
sudo apt install \
    libxrandr-dev \
    libxcursor-dev \
    libudev-dev \
    libfreetype-dev \
    libopenal-dev \
    libflac-dev \
    libvorbis-dev \
    libgl1-mesa-dev \
    libegl1-mesa-dev
Configure and build your project. Most popular IDEs support CMake projects with very little effort on your part.

VS Code via the CMake extension
Visual Studio
CLion
Qt Creator
Using CMake from the command line is straightforward as well. Be sure to run these commands in the root directory of the project you just created.

cmake -B build
cmake --build build
Enjoy!

5
General / Re: SFML for GCC 13.2.0
« on: November 04, 2024, 08:26:42 pm »
I've tried CMAKE (mingw32-make GCC for Windows 10) and it builds through 80% - with linked libraries built for system, main, window, and network.  But at 80% it fails when trying to link shared library graphics:

[ 80%] Linking CXX shared library ..\..\..\lib\sfml-graphics-2.dll
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/SFML-2.6.1/extlibs/libs-mingw/x64/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5614): undefined reference to `_setjmp'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/SFML-2.6.1/extlibs/libs-mingw/x64/libfreetype.a(smooth.c.obj):smooth.c:(.text+0x77a): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status

6
General / SFML for GCC 13.2.0
« on: November 04, 2024, 05:20:06 pm »
When will SFML have a GCC 13.2.0 compatible build?   MSYS only download is 13.2.0 and it is near impossible to get an 13.1.0.

Pages: [1]