Hello! I am really excited to be getting into C++ and so far SFML has made this so much more enjoyable. I have a few general questions WRT linking that I could not find in the FAQs or on google that should be pretty simple.
I am running on Code::Blocks 20.03 on Windows 10 with MinGW 7.3.0 x64 (SEH)
SFML v2.5.1 as per the download page for CGG 7.3.0 MinGW (SEH) x64
I have had a little confusion about the linker settings
because sometimes a project will compile and run just dandy, but if I create another project with identical project/build settings and even use the same code from the previous project in CB, it will throw compile errors.1. Is it common for Code Blocks not to run/execute the project/build settings if they were recently changed? I feel like I have gone into that setting screen and configured it every possible way but it will throw the same error, regardless of what is linked or changed when I try to rebuild the project.I figured out you have to rebuild the whole project for the linking settings to actually work.
2. Is it okay to link to the dynamic libraries for the debug build, and the static libraries for the release build? I was reading in another thread that you shouldn't link to both the dynamic and static libraries at the same time, but if they are configured to be completely separate for the debug and release build settings that shouldn't be an issue, correct?
For example, should the following settings work or do I need to link the the sfml-xxx-s-d libraries for the debug portion of the settings?
Project 1 -> SFML App -> Search Directories -> Compiler -> SFML\Include
-> Linker -> SFML\Lib
Debug -> Linker Settings
sfml-graphics-d
sfml-window-d
sfml-system-d
sfml-main-d
Release -> Linker Settings
sfml-graphics-s
freetype
sfml-window-s
opengl32
gdi32
sfml-system-s
winmm
sfml-main
-> Compiler Settings -> #Defines -> SFML_STATIC
-> compiler Flags -> -static
3. When static linking, I am a little confused about the order of the dependencies. sfml-graphics depends on sfml-windows which depends on sfml-system so you list them top to bottom in that order. But when static linking, both sfml-window and sfml-system both depend on winmm. Does this mean you should order winmm at the very bottom like:
sfml-window-s
sfml-system-s
winmm
Is it more clean to just order all sfml files at the top and all the other dependencies at the bottom?
4. The SFML and Code::Blocks tutorial and the FAQ "How do I link SFML statically?" lists the dependencies as...
sfml-window, sfml-graphics, sfml-audio, sfml-network, sfml-system... with their sub-dependencies.
These are not showing the main modules in their proper order, correct? They should be audio, graphics, window, network, system?
Thank you very much for any help! I know these probably seem pretty n00b
but I hope they make sense. Just trying to fully understand how all these things plug together.