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

Pages: [1]
1
General / Re: Cannot compile (Code::Blocks 12.11 / Mingw) Win7 64
« on: September 16, 2013, 02:32:59 am »
I got it working (even made the circle blue  :D), I downloaded the "GCC 4.7 TDM (SJLJ) - 64 bits" version. Is this still bad though, given that says GCC 4.7 and my MinGW is GCC 4.8.1. Is the general idea then that I should always rebuild libraries to be up-to-date with any compiler I have?

I'm aware of 32bits being able to run on 64bit, I just always assumed I had to download Mingw in 64bit because my OS is 64. So, if I'm not mistaken, I could actually download MinGW in 32bit format instead (and probably should?). When that tutorial said we should use 32 bit versions (unless we have a good reason to use 64), I thought that only applied to any libraries we download, so should my compiler too be 32bit - even if I'm compiling on Win7 64 bit? Sorry if I sound stupid.

So many bits, so little time...

2
General / Re: Cannot compile (Code::Blocks 12.11 / Mingw) Win7 64
« on: September 16, 2013, 01:49:13 am »
It seems like your compiling for 64 bits, so you should use the 64 bits SFML libraries.

You lost me here. I downloaded Mingw 64 for Code::Blocks as I thought thats what I need because I'm on Win7 64bit?

I'm by no means a C++ expert and am still learning. I thought if I was compiling for 64 bits, I would've chose SFML 64bit. On this page:

http://www.sfml-dev.org/download/sfml/2.1/

I chose "GCC 4.7 TDM (SJLJ) - 32 bits". I'm compiling with Mingw, specific release "x64-4.8.1-release-win32-sjlj-rev3" (the zip folder was named that).

3
General / Cannot compile (Code::Blocks 12.11 / Mingw) Win7 64
« on: September 15, 2013, 02:24:48 pm »
Hello folks, I'm having trouble trying to get SFML working. I'm on Win7 64bit using Code::Blocks 12.11 with Mingw compiler (x64-4.8.1-release-win32-sjlj-rev3). The problem:

Build messages:

Quote
||=== SFML Test, Debug ===|
ld.exe||cannot find -lsfml-graphics-d|
ld.exe||cannot find -lsfml-window-d|
ld.exe||cannot find -lsfml-system-d|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 2 seconds) ===|

Build Log:

Quote
-------------- Build: Debug in SFML Test (compiler: GNU GCC Compiler)---------------

x86_64-w64-mingw32-g++.exe -L..\..\Libraries\SFML-2.1\lib  -o "bin\Debug\SFML Test.exe" obj\Debug\src\main.o    -lsfml-graphics-d -lsfml-window-d -lsfml-system-d  -mwindows
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib\libsfml-graphics-d.a when searching for -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-window-d.a when searching for -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib\libsfml-window-d.a when searching for -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-window-d.a when searching for -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-system-d.a when searching for -lsfml-system-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib\libsfml-system-d.a when searching for -lsfml-system-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-system-d.a when searching for -lsfml-system-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system-d
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
3 errors, 0 warnings (0 minutes, 2 seconds)
 

I will try to list everything to help diagnose the problem. I started out here:

http://www.sfml-dev.org/tutorials/2.1/start-cb.php

I followed it to a t.

I set the include / lib paths globally as stated, then linked as stated. As they said not to include .a or lib prefix, and by the looks of it they simply typed the name in (rather the clicking the actual file in the file browser), so I typed the correct ones.

Build options>Linker settings>Link libraries

Release:

sfml-graphics
sfml-window
sfml-system

Debug:

sfml-graphics-d
sfml-window-d
sfml-system-d

Everything in the screenshots matches mine exactly. I'm linking dynamically.

The version I downloaded was GCC 4.7 TDM (SJLJ) - 32 bits. My compiler is properly installed I believe as I've used it perfectly for console applications and C++11 for some time. When I got Code::Blocks I had to get Mingw seperatly (if I recall, because I was on 64bit), not a Code::Blocks supplied one. The Mingw download zip was named x64-4.8.1-release-win32-sjlj-rev3, which I believe is SJLJ and matches the SFML download.

This is what my "Global Compiler Settings" look like:



I hope that was thorough enough, can somebody please help? :)

Pages: [1]