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

Pages: [1]
1
General / Dynamic linkage curiosity (linux)
« on: September 21, 2011, 11:32:31 pm »
Hi there.

I was wondering, why isn't it necessary to link all the dependencies when I compile a game using SFML? For example, I'm now dealing with a game about audio, so I use -lsfml-graphics and -lsfml-audio. However, if I inspect the compiled program:

Code: [Select]
ldd ./programa
linux-vdso.so.1 =>  (0x00007fff2ee8e000)
libsfml-audio.so.1.6 => /usr/lib/libsfml-audio.so.1.6 (0x00007f8244546000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f8244240000)
libm.so.6 => /lib/libm.so.6 (0x00007f8243fbc000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f8243da6000)
libc.so.6 => /lib/libc.so.6 (0x00007f8243a23000)
libsfml-system.so.1.6 => /usr/lib/libsfml-system.so.1.6 (0x00007f8243819000)
libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0x00007f82435b4000)
libopenal.so.1 => /usr/lib/libopenal.so.1 (0x00007f824335c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8244789000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f824313e000)
libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0x00007f8242ef4000)
libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00007f8242a25000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007f82427f8000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x00007f82425f1000)
librt.so.1 => /lib/librt.so.1 (0x00007f82423e9000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f82421e4000)


There are many other libraries, specially libopenal, that get "automatically linked". How do you do it? It's interesting.

I've used OpenAl in other projects, and in all of them I had to either manually link using -lopenal, or use something like the output of pkg-config --libs

2
Audio / Clear buffer of sf::SoundBufferRecorder
« on: September 21, 2011, 02:38:00 pm »
Hi.

I'm trying to do some pseudo-real time processing, using sf::SoundBufferRecorder. The question I have is, how do I clear empty the buffer captured by sf::SoundBufferRecorder once I have processed the data?

I've tried deleting the sf::SoundBufferRecorder using something like

Code: [Select]
recorder = sf::SoundBufferRecorder();


But it gives me an error in compile time. I can't directly modify the buffer that returns GetBuffer() because it's const.

What can I do?

3
Window / [Linux] UTF-8 on window titlebar (UTF-8 encoded file)
« on: February 07, 2011, 01:11:48 am »
Hi there.

I've just started using SFML and one of the first problems I've come across is some weird characters on the the titlebar whenever I try to use accents or any other extended char.

For instance, I've got:
Code: [Select]
   sf::RenderWindow Ventana(sf::VideoMode(800, 600, 32), "Año nuevóóó");

And the titlebar renders like: "AÂ+o nuevoA³A³A³".

This ONLY HAPPENS if my source code file is enconded in UTF-8. If I change encoding to ISO-8859-1, it shows properly. Obviously all of my files use UTF-8, as its the system-wide encoding.

Pages: [1]