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

Pages: [1]
1
General / Re: Help with static linking
« on: October 02, 2015, 01:41:48 pm »
If you've been reading the "SFML & Linux" tutorial, then it's not explained. (why?)
You have to link SFML dependencies for each module you're using, I don't know where to find the list of dependencies for Linux (I haven't searched) but you can find one for Windows in the FAQ or in the codeblocks and Visual Studio tutorials.
And I've read here that it's recommended to link dynamically on Linux and mac.
Okay, thank you!

2
General / Re: Help with static linking
« on: October 01, 2015, 03:51:04 pm »
You searched everywhere? Except for the most obvious place, that is the official tutorial? And all the other hundred threads about static linking? ;)

As has been said link SFML's dependencies as explained in the official "setup" tutorials.
I looked there, I didn't understand it that well

3
General / Re: Help with static linking
« on: October 01, 2015, 01:12:43 am »
I'm trying to create a staticly linked executable. I've been searching and trying for two hours with no success, and I can't find anything to help me anywhere. I have proper code, it will compile and run when dynamicly linked, and I have all the static libraries, I just can't get my program to compile staticly, it just throws a ton of errors saying "undefined reference". The command I'm using to compile is below

Code: [Select]
g++ -DSFML_STATIC -I/usr/local/./include/SFML -L/usr/local/lib main.cpp -lsfml-graphics-s -lsfml-window-s -lsfml-system-s
The errors I get are below (spoiler because it's long)
(click to show/hide)

4
General / Re: Help with static linking
« on: October 01, 2015, 01:08:36 am »
Maybe if you posted the specific errors you get people would have a chance to suggest what libraries (or whatever) you are not linking correctly.
Remember this though: when linking statically, SFML itself must have been built for static linking and you must explicitly link all of its dependencies.
Then it's probably my build of SFML, I didn't link its dependencies. Is there any place that explains how to do that?

5
General / Help with static linking
« on: October 01, 2015, 12:58:41 am »
I'm trying to create a staticly linked executable. I've been searching and trying for two hours with no success, and I can't find anything to help me anywhere. I have proper code, it will compile and run when dynamicly linked, and I have all the static libraries, I just can't get my program to compile staticly, it just throws a ton of errors saying "undefined reference". The command I'm using to compile is below

Code: [Select]
g++ -DSFML_STATIC -I/usr/local/./include/SFML -L/usr/local/lib main.cpp -lsfml-graphics-s -lsfml-window-s -lsfml-system-s

Pages: [1]