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

Pages: [1]
1
SFML projects / Goal and rules of this forum
« on: July 13, 2011, 09:44:03 am »
You may consider giving Krut a try:
http://krut.sourceforge.net/
I've used it to record a few videos, and while they do occasionally lag a bit, they get a pretty decent framerate. It's only a few megabytes and there's no installation, so it's probably worth a shot anyway. :)

2
General / SFML2 Linking Errors
« on: November 08, 2010, 08:09:51 am »
Ah, that explains it! :oops:
Thanks for your help.

3
General / SFML2 Linking Errors
« on: November 08, 2010, 07:53:13 am »
I'm using CMake and setting BUILD_SHARED_LIBS to false - shouldn't SFML_STATIC already be defined?

4
General / SFML2 Linking Errors
« on: November 08, 2010, 07:38:32 am »
Oh, I threw sfml-main in there after it refused to build. It didn't do anything, obviously, but I forgot to take it out.
I just tried compiling it in Debug with the debug libraries, but I got the same errors.
The Build Log tells me that everything has compiled, but gets the errors after "Linking executable". SFML_DYNAMIC is definitely not defined anywhere.
If it's worth anything, my compiler is following C++0x standards.

5
General / SFML2 Linking Errors
« on: November 08, 2010, 07:16:24 am »
The files I'm linking to are named "libsfml-audio-s.a", "libsfml-graphics-s.a" and so on.

6
General / SFML2 Linking Errors
« on: November 08, 2010, 07:04:45 am »
My linker settings are as follows:
Code: [Select]
-lsfml-audio-s
-lsfml-graphics-s
-lsfml-main
-lsfml-window-s
-lsfml-system-s
-static-libgcc

I have a bit of a bad track record with missing some minor mistake in linking and spending days trying to fix it, so it's entirely possible that I'm missing something :P

7
General / SFML2 Linking Errors
« on: November 08, 2010, 06:35:51 am »
I've been trying to compile SFML2 using CMake from the latest snapshot. SFML2 compiles fine, but whenever I try to start a project with it, I get hundreds of errors like this in the linking stage (from within my own code):
Code: [Select]
obj\Release\AnimSprite.o:AnimSprite.cpp|| undefined reference to `_imp___ZN2sf6SpriteC1Ev'|
Currently, the lib and include files are installed directly into my MinGW folder. However, I've also tried using the install make and adding the Program Files\SFML directories as search directories, but it gave the exact same errors.
I'm compiling using Code::Blocks and MinGW, and compiled SFML using CMake and a clean install of MinGW.
Any help would be appreciated. Thanks!

8
General / Updating SFML 1.6 to 2.0 (C++)
« on: October 22, 2010, 11:59:03 pm »
That's likely why it's throwing those errors, then - the reference to SetCenter is in my own code. I'm using the current headers as far as I know. I'm still a bit puzzled by the multiple definition error, though.
EDIT EDIT:
Nevermind, I think I was just getting a different compile error first. I'm still getting the "multiple definition of `sf::Font::~Font()'" error. If I don't use any Font functions in main.cpp, it doesn't give me this error. Is there any way I could fix this?
As well, now that I look at it, I'm getting these errors in the linking stage, so that means that you're right about the headers being outdated. That said, I've checked the headers, and they're definitely the new ones. Maybe I'm experiencing some strange Code::Blocks quirk?

EDIT EDIT EDIT:
Okay, I found the problem. Code::Blocks had an old version of SFML set as a default search directory, but I had forgotten that. It doesn't show up in the project settings, so I didn't notice. It was getting outdated headers from there, but a new version of the library, which was causing the problems.
Thanks anyway!

9
General / Updating SFML 1.6 to 2.0 (C++)
« on: October 22, 2010, 02:35:24 am »
I compiled SFML from the build\codeblocks\SFML.workspace file. In order to get it to compile, I had to add -ws2_32, because it was throwing me errors regarding missing network functions.
My linker settings for the project itself are as follows:
Code: [Select]
-static-libgcc
-lsfml2-audio-s
-lsfml2-graphics-s
-lsfml2-window-s
-lsfml2-main
-lsfml2-system-s

Thanks for replying so quickly!

EDIT:
I also tried recompiling SFML2 using both my regular Code::Blocks installation of MinGW and another, almost clean install of it, but both are giving me the same errors at compile time.

10
General / Updating SFML 1.6 to 2.0 (C++)
« on: October 21, 2010, 06:34:38 am »
Hey there!
I've been working on a project for a while in SFML 1.6, and a lot of the functions in 2.0 seem really useful to me, so I've decided to upgrade. I grabbed the latest snapshot off the website and compiled it, but now I'm having a bit of a problem:
I've linked my project to all the necessary sfml2-x libraries and I replaced the include files with the new ones. However, I'm getting a lot of errors when I try to compile my project, starting with:
Code: [Select]
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.0\..\..\..\libsfml2-graphics-s.a(Font.o):Font.cpp|| multiple definition of `sf::Font::~Font()'|
obj\Release\AnimSprite.o:AnimSprite.cpp|| undefined reference to `sf::Sprite::SetImage(sf::Image const&)'|
obj\Release\AnimSprite.o:AnimSprite.cpp|| undefined reference to `sf::Drawable::SetCenter(float, float)'|

And so on.
I tried compiling a new program using the sample code from the Code::Blocks setup page, and it compiled just fine. I used the exact same linker settings, so I'm wondering why it would be throwing me these errors.
I'm using Code::Blocks with MinGW as compiler, and if it makes any difference, I'm having g++ use the new C++0x standard.
Any help would be appreciated. Thanks!

Pages: [1]
anything