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.


Topics - sirckopo

Pages: [1]
1
General / Static linking issues
« on: December 21, 2014, 07:01:32 am »
Codeblocks 13.12, SFML 2.1 -> 2.2 x86 (static), Win7 x64. A random project.
Ok, i've just switched to 2.2 and added exactly all the libraries listed in the tutorial. Got errors, moved these libraries after SFML' ones, and...
What the hell is that?
// ... compiling to *.o ...
mingw32-g++.exe -LC:\SFML-2.2\lib -o bin\Release\ckChessie.exe <... *.o ...>  -static-libstdc++ -s  -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -ljpeg -lglew -lfreetype -lopengl32 -lgdi32 -lwinmm
C:\SFML-2.2\lib/libsfml-graphics-s.a(ImageLoader.cpp.obj):ImageLoader.cpp:(.text+0x11204): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0xb66): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0xebc): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0x27c6): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0x2bd0): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj): bad reloc address 0x13 in section `.text.unlikely'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation

Some advice, or it is on your side?

God, seems that someone has declared war on static linking...  :-\

2
Audio / SoundBuffer makes a crash on start
« on: December 06, 2014, 03:05:16 pm »
Good daytime, guys.

I've started making a game project on SFML yesterday and already got a big problem. /subj goes here/

First, it uses DUMB-based ModMusic snippet from CosmoScroll (https://code.google.com/p/cosmoscroll) to play BGM. It works well (although, got some playing/looping issues on gobus.mod).

Then I decided to add some sounds. Made a separate file, wrote loading code, inserted extern sf::SoundBuffer declarations to a header file, tried to build it... And on running a binary file there goes 'whoops':

Process returned -1073741515 (0xC0000135).

Even if I don't make any references to it, it still even fails till I comment out all SoundBuffer declarations.
Debugger shows that it doesn't even makes it to main(), so I can think that's something about memory.

What can I do with it? May it be related to the ModMusic code?

Windows 7 x64, SFML 2.1 (static), Code::Blocks 13.12, no Qt.

UPD: If it is about code, here it is.
UPD2: Yeah, it even makes a crash with SoundBuffer in the same module. So.
UPD3: Derp, it does a crash even without ModMusic, and WITHOUT ANY WINDOWS. :o Code updated again, gonna reinstall SFML right now.
UPD4: OK, it becomes serious. Reinstalled SFML, tried again with below code and still crashes. Now it's your turn.

#include <SFML/Audio.hpp>

sf::SoundBuffer sndWhatever;

int main()
{
    return 0;
}


UPDn: The problem is solved. Kids, always put libsndfile-1.dll and openal32.dll, even if you're linking your project statically.

Pages: [1]