Hey everyone! I've been trying to get SFML 2.1 to work with MinGW and Code::Blocks and can't seem to figure out this compilation error.
-------------- Build: Debug in SFML2.1 ---------------
Linking console executable: bin\Debug\SFML2.1.exe
obj\Debug\main.o: In function `_exchange_and_add':
c:/mingw/lib/gcc/mingw32/4.8.1/include/c++/ext/atomicity.h:47: undefined reference to `__atomic_fetch_add_4'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
I've been following the official tutorial (
http://www.sfml-dev.org/tutorials/2.1/start-cb.php), and haven't noticed any obvious mistakes. The code I'm using is exactly copied from the tutorial, so no need to paste that here.
I tried hitting google and haven't been able to find much help. Anyway, has anyone encountered this problem? Any suggestions on what I should search in order to fix this issue? I'm not entirely sure what's causing the problem between MinGW, SFML, and Code::blocks.
Thanks in advance for the help!
Edit: And I should probably clarify that I have no problem compiling normally with MinGW. I just have the issue with SFML. The version of SFML I downloaded is for GCC MinGW DW2. I've tried a few other versions, and compiling the source from scratch and keep getting the same error. At the moment I'm linking SFML statically.
EDIT 2: UUUUUUUGH I've been working on this issue for 2 days, and the SECOND I post for help online I figure out the issue. So for SOME reason Code::blocks had i386 option ticked in the project build options. I tried unticking that, and sure enough it worked fine. Anyway, just ignore this thread.