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

Author Topic: Code::Blocks - Problems in General [SOLVED]  (Read 6013 times)

0 Members and 1 Guest are viewing this topic.

Kain Nobel

  • Newbie
  • *
  • Posts: 38
    • View Profile
Code::Blocks - Problems in General [SOLVED]
« on: January 04, 2022, 11:27:55 am »
Hello and good day everybody,

I've set this up three or four times in the past and always have the same problem, always get the same answers, always find the same solutions but can never remember what I did to make it work.

So I'm trying to setup a new SFML project. I've followed the tutorial, I've scoured the forums, I've searched the internet and now I'm here.



Yes, those files are installed in those locations. I've swapped out the s.a and the d.a and the s-d.a endings just to see if I can get something to 'click' but no progress. The files in the screenshot were selected with the File Select dialog in Code::Blocks and not hand-written so I'm not sure why GCC can't figure this out.

When I was following the tutorial, I did the "sfml-graphics", "sfml-audio", etc (simple names) but now I'm doing fullpath GCC still can't find these files. I get a list of "cannot find libsfml-" stuff.

I've got Search Directories / Compiler set to "C:/sfml/2.5.1/include"
I've got Search Directories / Linker set to "C:/sfml/2.5.1/lib"
I've set Compiler Settings / #define set as "SFML_STATIC"

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

g++.exe -L..\SFML\2.5.1\lib -LC:\SFML\2.4.2\lib -LC:\RGL\lib -LC:\SFML\2.5.1\lib -o bin\Debug\RGL.exe obj\Debug\main.o obj\Debug\src\appwindow.o obj\Debug\src\rgl.o obj\Debug\src\rgl\audio.o obj\Debug\src\rgl\input.o   -lsfml-graphics -lsmfl-window -lsfml-audio -lsfml-system -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system C:\SFML\2.5.1\lib\libsfml-audio-s.a C:\SFML\2.5.1\lib\libsfml-window-s.a C:\SFML\2.5.1\lib\libsfml-audio-s.a C:\SFML\2.5.1\lib\libsfml-system-s.a
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsmfl-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-audio.a when searching for -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-audio
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-graphics.a when searching for -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-window.a when searching for -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-window.a when searching for -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-window.a when searching for -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-window.a when searching for -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-window.a when searching for -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-window.a when searching for -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-window
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib\libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib\libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\SFML\2.5.1\lib/libsfml-system.a when searching for -lsfml-system
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
9 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Thank you to anyone who can help me, I would like to get this project rolling again.
« Last Edit: January 09, 2022, 06:40:09 am by Kain Nobel »

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Code::Blocks - Cannot find libraries?
« Reply #1 on: January 05, 2022, 07:11:40 am »
I'm not sure if that's the only problem, but if you want to link the static version of SFML you need to link
sfml-graphics-s (or sfml-graphics-s-d if debug) and I see -lsfml-graphics in your log without the -s (nor the -d)
On top of that if you're in static, you also have to link every needed dependencies, in the correct order. You can find the list in the table in the 2nd half of the tutorial

Also make sure the sfml package you're using was compiled with the same compiler/version as the one you're using.


BTW when you have everything working, you can create a template project in codeblocks so that you won't have to set up everything again in new projects. I don't remember how but it should be easy
« Last Edit: January 05, 2022, 07:14:16 am by G. »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Code::Blocks - Cannot find libraries?
« Reply #2 on: January 05, 2022, 07:22:58 am »
You shouldn't add the libraries to the global compiler settings, but instead modify the project settings, see the getting started tutorial
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kain Nobel

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Code::Blocks - Cannot find libraries?
« Reply #3 on: January 06, 2022, 11:10:51 am »
I've been through the setup process numerous times and I've exhausted the tutorials at this point. I'm trying to use the TDM SLJL whatever version with the matching download and I'm just not getting anywhere. The libraries load now, the application compiles but then I get an error.



Prior to this I was using the other 32bit library combo, MinGW 7.1.0 but I was getting the same problem. Then it was still looking for some lib**sljl dll so I just switched. I've switched back and forth a couple of times. I've wiped the slate clean, TDM is what it is for the time being.

I know you said that matching the compiler and the library you download is important, maybe I need to set something up in Code::Blocks?

I don't know if being on the newly launched Windows 11 has any influence over the fact that I can't get it to run.

I'm running out of patience with this, if there is an easier way to get something up and running I'm all ears. Deploying this has been anything but simple and fast for me, I've analyzed this at a thousand points and don't know what else I could do correctly because I don't even know what I'm doing wrong in the first place.

I'm also having problems with the CMake, following the tutorial, the 3rd step it can't Configure the project. I'll mess with that more tomorrow and it can be another topic if I don't figure it out myself.

I haven't even hardly wrote a single line of C++ yet for this deployment, I'm quite perplexed.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Code::Blocks - Problems in General
« Reply #4 on: January 06, 2022, 05:16:17 pm »
Understanding the ecosystem is as much part of learn C++ as writing C++ is.
One skill you need to hone in programming is to be persistent. If you throw away things too fast and keep switching ways too often, you're not digging deep enough and thus will more likely confuse and frustrate yourself instead of finding a working solution.
Problem solving is fundamentally about methodically breaking things down into smaller problems until you understand what's going on. Moving on whenever you hit a hard rock, won't help you dig deeper. ;)

As I wrote you, I personally highly recommend using Visual Studio, if you're Windows. It provides a much better experience and with their universal runtime, you can reuse the SFML libs for VS 2017 in VS 2019 or 2022.
If you want to stick to Code::Blocks then you need to accept that this decision requires you to understand a bit more about the underlying compiler and thus also has more failure points.

First you need to decide between the two options:
  • Stick with the compiler that comes with Code::Blocks and build SFML from source
  • Download the compiler with which one of the provided SFML packages was built

For option 1) you then may want to redownload Code::Blocks package that includes MinGW and do a clean install of Code::Blocks, to prevent that you may have misconfigured anything.
Then you download SFML from GitHub and follow the CMake tutorial on how to build SFML.
After that, you follow the setup tutorial step by step, while reading the text and not just looking at the images. ;D

For option 2) you download the compiler mentioned on the SFML download page and the matching SFML package. Pay especially attention to whether you picked 32-bits or 64-bits for either.
Unpack the compiler to a location of your desire. Then open Code::Blocks and navigate to the global compiler options. There you enter the path to the bin/ directory of the just unpacked compiler.
Then create a new project and continue setting everything up step by step as shown in the tutorial.



Feel free to join Discord, which can make it easier to help solve potential issues.

FYI 0xc0000007b is usually an issue with the architecture, meaning you probably mixed up x64 and x86 DLLs somewhere.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kain Nobel

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Code::Blocks - Problems in General
« Reply #5 on: January 07, 2022, 10:04:28 am »
PROGRESS! I'm getting different errors! I can study tutorials until the cows come home but my brain is mush. I can't get either the discord server or the IRC to connect but once I do I'll reach out to more than just the folks on the forum. Also, I'm going to pick back up on my studies because I feel I've become stupid again.

I thank you eXpl0it3r for always being there to help but I know you're probably busy as all hell! I'm not even mad at ya because I know and understand. With all the issues being tracked, there is a LOT to this "simple" library. I've used it in the past and I know that it's good and can do nothing but be improved, improved, improved and improved. I have one of the books. I've been doing things with this, but it's been a busy couple of years and I'm rusty as all hell. I haven't touched anything since... 2019.

>> I'm looking for anybody on here who has had problems with this in the past but have figured it out to give me a call or something; PM me and I'll give you the number. Sometimes its nice to talk live with a human. I want to go point by point by point and make sure EVERYTHING is set up correctly and start making history happen. <<

Current Situation

For info on my situation right now; the entire thing IS compiling but now I'm getting missing DLL entry point errors. Sample...



I've had multiple different setups at this point which is probably why my brain is all mushy like a bowl of mashed potatoes. Admittedly, I haven't looked too much into it today because I don't want it to turn into potato soup. Looking at my download history and current installed stuff it appears the setup is...

tdm-gcc-5.1.0-3
SFML-2.5.1-windows-gcc-5.1.0-tdm-32-bit
cmake-3.22.1
(I don't remember if its command line or GUI, I want to say it's command line...)

My ENV PATH looks like (redundant WINDOWS entries omitted)...

Code: [Select]
"Path"=>
C:\\Program Files\\Git\\cmd;
C:\\RGL\\lib\\;
C:\\ActiveTcl\\bin;
C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI;
C:\\Program Files (x86)\\CMake\\bin;
C:\\TDM-GCC-32\\bin;
C:\\Users\\kainn\\AppData\\Local\\Microsoft\\WindowsApps;
C:\\Program Files\\Git\\cmd;
C:\\Ruby30-x64\\bin;
C:\\RGL\\lib\\;
C:\\RGL\\lib\\gui\\;
C:\\RGL\\error\\;
C:\\RGL\\profs\\;
C:\\RGL\\tests\\;
C:\\ActiveTcl\\bin;
C:\\cmake-3.22.1;
C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI;
C:\\Program Files\\CodeBlocks\\MinGW\\bin;

I've not added anything SFML to the PATH because of settings within the Code::Blocks project file, and I'd like NOT to add anything else to the PATH (for the time being) but, if I absolutely have to, I will...
Situation Update

I've began the installation and setup process for Visual Studio Code. I'm not doing much with it (hopefully) tonight but it shouldn't be a problem, should it? If anybody shoots me a call, I'll wait a minute before I do anything with VS and try to figure out my problems via Code::Blocks. I get lost in the woods sometimes setting this stuff up. So far I've added the C/C++ and Ruby extensions (it appears the Ruby extension may be broken?) but it looks like it wants me to write it a build script if I'm not mistaken.

Sidenotes / Rambling

I think with all the madness going on, the tutorials might need to be reviewed and updated for accuracy of information. Obviously, I don't know what the hell I'm doing personally, but I'd be willing to help in the future if need be (and if I get proficient with these systems and the C++ language. And whatever else...) I don't personally know what's accurate and what's not but I see others who have had issues too, I'm currently hitting a snag with CMake GUI.

I'm actually surprised there isn't a big STICKY at the top of this forum with massive lists of tutorials and resources for the entire environment needed to be in full production mode with this library. Links to cplusplus.com, links to relevant Code::Blocks and Visual Studio information, links to anything CMake, MinGW, etc. Talk of these things is probably better suited for a place like StackOverflow.com but there is definitely a TON of crazy stuff to learn. Maybe I'll try to compile a list tomorrow if I can but I also have to do taxes......
« Last Edit: January 07, 2022, 11:04:10 am by Kain Nobel »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Code::Blocks - Problems in General
« Reply #6 on: January 07, 2022, 03:32:01 pm »
For info on my situation right now; the entire thing IS compiling but now I'm getting missing DLL entry point errors. Sample...



I've had multiple different setups at this point which is probably why my brain is all mushy like a bowl of mashed potatoes. Admittedly, I haven't looked too much into it today because I don't want it to turn into potato soup. Looking at my download history and current installed stuff it appears the setup is...

tdm-gcc-5.1.0-3
SFML-2.5.1-windows-gcc-5.1.0-tdm-32-bit
The specific error usually means you have used a different compiler than the one SFML was built with, but if you'd downloaded already the one specified in the list, all that remains, is that you go into Code::Blocks and in the global compiler settings, change the path to where the TDM compiler is located (I assume C:\\TDM-GCC-32\\bin).

I've began the installation and setup process for Visual Studio Code. I'm not doing much with it (hopefully) tonight but it shouldn't be a problem, should it?
I don't really recommend Visual Studio Code for C++ development, unless you're comfortable with C++, toolchains and CMake, because you need to setup even more and need to understand things even better that with Code::Blocks.

I recommend the "normal" Visual Studio, it has all built-in, is quite easy to use and little room to misconfigure.

I think with all the madness going on, the tutorials might need to be reviewed and updated for accuracy of information.
From my perspective the information is accurate. If you don't try 10 different things at the same time and understand the tooling and can follow the text and not just look at pictures, it's quite easy to follow. Some things might be a bit dated, so I believe improvements can certainly be made for some parts.

SFML is a bit in an interesting position that the simplicity of the library enables a lot of new beginners to break into C++ programming, with the cost of the same collection of people having to realize that the tooling is also an important part of the whole C++ eco system and having to learn how to configure an IDE.
In theory we as library writers have no "obligation" to write detailed tutorials on how to utilize your IDE, because it's just another library among hundreds. For example Boost among the most well-known C++ libraries only has a very brief paragraph for VS or the command line on Windows and a basic command line for Unix-like systems. How to link all the 20+ boost libraries and what options exist or how to integrate it in other IDEs isn't there and lots of libraries don't even offer this basic information.
All that said to slightly manage your expectation, that SFML should be giving the upmost detailed and accurate explanation of how to use your chosen toolchain. We try to help people as much as possible, especially since we are aware of how SFML is helping a lot of new developers finding their way into C++ and game development, but we also expect that the users invest enough time in learning how to effectively use their C++ tools independent of SFML. ;)
« Last Edit: January 07, 2022, 03:34:33 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kain Nobel

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Code::Blocks - Problems in General
« Reply #7 on: January 09, 2022, 06:39:54 am »
* LEAPS OUT OF CHAIR* WOOOOOOOOOOO!!!!!!!!

That was trial by fire but I'm so glad I stuck with it! Last time I had this running was 2019 and I only stopped because life kept me too busy to focus on hobbies.

  • Install Code::Blocks - CHECK!
  • Install CMake - CHECK!
  • Install that TDM compiler - CHECK!
  • Install the correct SFML version - CHECK!
  • Setup Environment PATH variables - CHECK!
  • Run the CMake to generate build files - CHECK!
  • Build the damn thing and make it run - HELL YEAH, CHECK!
  • Setup a bunch of other stuff outside the scope of this topic - YES, CHECK!

I've got this far, and I can't really think of anything else I'd have to do to. It looks like everything is building, the application is running, I believe it is linking up to my personal project. There is still a lot I don't understand and it might take me a while to figure out all the little bells and whistles. Are the tutorials inaccurate? Did I misunderstand a couple parts? Maybe and maybe. One thing I had to do was download the help file from the CMake website and I read all 400+ pages of that bad boy twice.

In the end I realized I was pointing to the wrong compiler, doh! Thank you for pointing that out.

Big thanks to you eXpl0iter! I'll have to go through my entire download and browsing history and start digging out all the little nuggets I found that aren't exactly SFML related but one would need to know and have to in order to develop an SFML project. I'm writing a sticky note for that, I'll probably get to it next week because I have two computers to look through. For now, I'm going to see what kind of TROUBLE I can get into hahaha!

Again, thanks! :)
« Last Edit: January 09, 2022, 06:43:03 am by Kain Nobel »

 

anything