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

Pages: [1]
1
General / Re: SFML 2.2 Static linking
« on: December 26, 2014, 02:41:43 am »
This is a pretty fresh install of Windows (8.1 btw, not sure if that matters), so I'm certain this is the only version of Code::Blocks/TDM that I've downloaded.

Also, I just set it up to link dynamically instead, and it does the same thing (builds with no errors, same crash when I run it).

Edit: well, I got it to work on Ubuntu.  Not exactly a solution but I suppose it'll do for now :P

2
General / Re: SFML 2.2 Static linking
« on: December 25, 2014, 09:04:14 pm »
Ok, now I'm even more confused.  So MinGW is a gcc port; TDM-GCC is a different port that uses the same runtime APIs?

I guess what I need now is for someone to tell me where to get a compiler that works with one of the available SFML binaries.

3
General / Re: SFML 2.2 Static linking
« on: December 25, 2014, 06:40:22 pm »
Damn, now I feel like an idiot.  Well, thanks for the help everyone.  I appreciate your patience.

4
General / Re: SFML 2.2 Static linking
« on: December 25, 2014, 06:12:13 pm »
Compiler is the default one that came with Code::Blocks, codeblocks-13.12mingw-setup.exe from this link: http://www.codeblocks.org/downloads/26#windows

SFML is the "GCC 4.7.1 TDM (SJLJ) - 32-bit" option from here: http://www.sfml-dev.org/download/sfml/2.2/

5
General / Re: SFML 2.2 Static linking
« on: December 25, 2014, 04:52:32 am »
I'm using mingw 4.7.1.  I'm not the OP (who was using 4.9.2), I just posted in this thread because it seemed related.

Here's the output from gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)

6
General / Re: SFML 2.2 Static linking
« on: December 24, 2014, 07:52:47 pm »
That didn't seem to fix it, I get the same results.  I tried copying the .dll's into the same folder as the executable, that didn't help either.  Though I noticed I don't have a libgcc.dll, instead there's a libgcc_s_dw2-1.dll and a libgcc_s_sjlj-1.dll.  Not sure if that matters.

Here is the new build log:

mingw32-g++.exe -Wall -g -DSFML_STATIC -I..\..\libraries\SFML-2.2-windows-gcc-4.7.1-tdm-32-bit\SFML-2.2\include -c C:\Users\jason\programming\projects\ArtilleryGame\main2.cpp -o obj\Debug\main2.o
mingw32-g++.exe -L..\..\libraries\SFML-2.2-windows-gcc-4.7.1-tdm-32-bit\SFML-2.2\lib -o bin\Debug\ArtilleryGame.exe obj\Debug\main2.o  -shared-libgcc -shared-libstdc++  -lsfml-graphics-s-d -lfreetype -lglew -ljpeg -lsfml-window-s-d -lopengl32 -lgdi32 -lsfml-system-s-d -lwinmm
Output file is bin\Debug\ArtilleryGame.exe with size 2.81 MB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))

7
General / Re: SFML 2.2 Static linking
« on: December 24, 2014, 04:11:41 am »
Ok that explains it, I was trying to build SFML from source.  Now I've decided that's over my head so I'm using the pre-compiled binaries.  I can build the test project with no errors, but it crashes when I try to run it.  Return value: -1073741510 (0xC0000005). 

I found this SO thread which seems to have a similar problem: http://stackoverflow.com/questions/22368784/sfml-wont-run-in-codeblocks-13-12, but I checked and my compiler (mingw 4.7.1) matches the version of the libraries I downloaded.  Not sure what to do from here.

Edit: here is my build log if that helps.

mingw32-g++.exe -Wall -g -DSFML_STATIC -I..\..\libraries\SFML-2.2-windows-gcc-4.7.1-tdm-32-bit\SFML-2.2\include -c C:\Users\jason\programming\projects\ArtilleryGame\main2.cpp -o obj\Debug\main2.o
mingw32-g++.exe -L..\..\libraries\SFML-2.2-windows-gcc-4.7.1-tdm-32-bit\SFML-2.2\lib -o bin\Debug\ArtilleryGame.exe obj\Debug\main2.o   -lsfml-graphics-s-d -lfreetype -lglew -ljpeg -lsfml-window-s-d -lopengl32 -lgdi32 -lsfml-system-s-d -lwinmm
Output file is bin\Debug\ArtilleryGame.exe with size 3.72 MB
Process terminated with status 0 (0 minute(s), 3 second(s))
0 error(s), 0 warning(s) (0 minute(s), 3 second(s))

8
General / Re: SFML 2.2 Static linking
« on: December 23, 2014, 06:09:44 pm »
What I meant was, do I need to tell Code::Blocks where the headers for those libraries are since SFML uses them?

In other words, following this guide: http://www.sfml-dev.org/tutorials/2.2/start-cb.php

When I want to use the SFML libraries, I add SFML\include to the compiler search directories.  Do I need to do something similar for the dependencies?

9
General / Re: SFML 2.2 Static linking
« on: December 23, 2014, 05:34:33 pm »
You aren't linking all the dependencies.  See http://www.sfml-dev.org/faq.php#build-link-static

I had some questions about how to do this.  I grabbed the libXXX.a files, some of them came with the SFML binaries I downloaded, others I found in my mingw/lib folder.  I added them to the "Link libraries" list under "Linker Settings".  This is my link order:

sfml-graphics
freetype
glew32
jpeg
sfml-window
opengl32
gdi32
sfml-system
winmm

If I haven't done anything wrong up to this point, my question is this: are there headers for these libraries?  If so, where do I find them?

Note: I'm using mingw 4.7.1.


Pages: [1]