SFML community forums

Help => General => Topic started by: m1ndas5 on January 19, 2020, 12:11:58 am

Title: Trying to build with DEV-C++, getting linked errors
Post by: m1ndas5 on January 19, 2020, 12:11:58 am
Greetings,

I'm trying to build / launch some games found on the web with DEV-C++ IDE.

I have:
- Installed TDM GCC 5.1.0 (verified against simple programs).
- Configured the include path: -I"C:\SFML-2.5.1\include"
- Configured the library path: -L"C:\SFML-2.5.1\lib"
- Added the linked library switches:

Quote
- C++ Compiler: C:\TDM-GCC-64\bin\g++.exe
- Command: g++.exe "C:\Users\darba\Desktop\Other Projects\16_Games\01 Tetris\main.cpp" -o "C:\Users\darba\Desktop\Other Projects\16_Games\01 Tetris\main.exe"  -I"C:\SFML-2.5.1\include" -I"C:\TDM-GCC-64\include" -I"C:\TDM-GCC-64\x86_64-w64-mingw32\include" -I"C:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include" -I"C:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\c++" -L"C:\SFML-2.5.1\lib" -L"C:\TDM-GCC-64\lib" -L"C:\TDM-GCC-64\x86_64-w64-mingw32\lib" -l sfml-graphics -l sfml-window -l sfml-system
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-window
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.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:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system
collect2.exe: error: ld returned 1 exit status
Title: Re: Trying to build with DEV-C++, getting linked errors
Post by: m1ndas5 on January 19, 2020, 12:14:51 am
Sorry to bother, seems I needed to install the 32bit compiler since the libraries are 32bit. This can be deleted.
Title: Re: Trying to build with DEV-C++, getting linked errors
Post by: Nexus on January 19, 2020, 10:34:03 am
Dev-C++ is a very old IDE, I remember having my first C++ steps with it in the 2000s...

Is there a reason why you don't use a more modern one, e.g. Visual Studio 2019 Community, which is free to use?
It may simplify a lot of configuration/setup on your end, and more people would be able to help you.
Title: Re: Trying to build with DEV-C++, getting linked errors
Post by: eXpl0it3r on January 20, 2020, 09:41:13 am
Dev-C++ is a very old IDE, I remember having my first C++ steps with it in the 2000s...
It's been unofficially updated until 2015 (http://orwelldevcpp.blogspot.com/), I've been using Visual Studio also in the early 2000s, that doesn't mean there haven't been updates. ;)
Title: Re: Trying to build with DEV-C++, getting linked errors
Post by: euscar on August 28, 2022, 04:45:56 pm
Hello.

I'm going back to this discussion to say that I'm using Dev-C ++ (Orwell version mentioned above) with SFML 2.4.2 because Dev uses the TDM-GCC 4.9.2 build set and so far everything is ok.

I know there is a new version Dev-C++ 6.3 (which uses TDM-GCC 9.2.0 32 / 64bit) maintained by Embarcadero at this web address https://www.embarcadero.com/free-tools/dev-cpp , but I have never tried it.
Maybe someday I'll do some testing to see if it supports SFML 2.5.1