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

Pages: [1]
1
C / Re: Undefined references
« on: December 12, 2018, 10:03:34 am »
OK, I've found the root cause of all the problems: seems that the conflicts were caused by the standard sfml rpms installed on my system. I've removed them and everything now seems to work fine (except that all go programs using go-sfml crash, but this is issue not related to csfml)

2
C / Re: Undefined references
« on: December 12, 2018, 09:43:06 am »
I have no idea what actually helped, but I've downloaded SFML sources, cmake + make + make install, changed CMakeConfig removing first two entries and inserting "/usr/local/lib" there instead, changed the makefile for the project, during run set LD_LIBRARY_PATH and it finally run...

3
C / Undefined references
« on: December 12, 2018, 09:39:38 am »
Hi,

Here's what I've been doing:


export SFML_DIR=/usr/local/lib/cmake/SFML
cmake .
make clean # just to make sure
make

Everything seems to build fine, libraries are installed in /usr/local/lib

However, when I try to build an example program from go-sfml packare using csfml, i got:

XXXXX:~/go/src/gopkg.in/teh-cmc/go-sfml.v24/examples/gosfml_example_c$ make

gcc -L /usr/lib64/ -lsfml-audio -lsfml-graphics -lcsfml-system -lsfml-system -lcsfml-window -lsfml-window -I/root/go/src/gopkg.in/teh-cmc/go-sfml.v24/examples/gosfml_example_c/../../CSFML/include -o go-sfml -lcsfml-audio -lcsfml-graphics main.c
/usr/local/lib/libcsfml-audio.so: undefined reference to `sf::SoundStream::onLoop()'
/usr/local/lib/libcsfml-graphics.so: undefined reference to `sf::RenderWindow::setActive(bool)'

I tried to use different -l order (i.e. -lsfml-audio -lcsfml-audio, -lcsfml-audio -lsfml-audio, main.c before everything else and several other combinations) and still have no success.

ld /usr/local/libcsfml-audio.so:

/usr/local/lib/libcsfml-audio.so: undefined reference to `sf::Sound::getStatus() const'
/usr/local/lib/libcsfml-audio.so: undefined reference to `sf::SoundSource::getVolume() const'
/usr/local/lib/libcsfml-audio.so: undefined reference to `sf::SoundBuffer::getSamples() const'
/usr/local/lib/libcsfml-audio.so: undefined reference to `sf::Sound::getPlayingOffset() const'
.....

Tens more follow.

I have a hunch that it would be enough to change SFMLconfig.cmake to point to a different directory, but I have no idea about cmake syntax

Pages: [1]
anything