SFML community forums

Help => General => Topic started by: fedor.birjukov on April 27, 2012, 10:43:51 am

Title: Build SFML (and SFGUI) WITHOUT ROOT privileges
Post by: fedor.birjukov on April 27, 2012, 10:43:51 am
Hi!

I'm using SFML + SFGUI in C++. Everything is fine.
The only problem is: I should be able to build my project on every ubuntu linux pc.
SFML depends on some libraries like -lXmu -lXi -lGLU -lGL -lXext -lX11
And I have no idea how to satisfy all that dependencies without installing some packages(libxmuu-dev, libxmuu-headers, ...).

Another problem is: I run 32 bit linux, My program should be able to build on 64 machines as well.

So, I suppose, I should build all that libs, too?
So, I suppose, I should have the source of all the libraries sfml depends on.
But is it realistic? Should I build X11?

Can anybody give me a piece of advice?

Thanks in advance,
Ted Biryukov.
Title: Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
Post by: eXpl0it3r on April 27, 2012, 01:26:06 pm
Best you read more about compiling of C++ code.
I've never needed root rights to compile anything. SFML should bring all it's dependencies with it.

As for your problem, you only need to download SFML's sourcecode and the newst CMake binary. Then execute CMake which creates a makefile. Aftwards you only need to enter make install and everything gets compiled. Next download SFGUI's sourcecode and repeate. Done.
Title: Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
Post by: Laurent on April 27, 2012, 01:32:19 pm
Quote
I've never needed root rights to compile anything
He needs them to install the dependencies, not to compile anything.

Quote
SFML should bring all it's dependencies with it.
Not on Linux!

Quote
As for your problem, you only need to download SFML's sourcecode and the newst CMake binary. Then execute CMake which creates a makefile. Aftwards you only need to enter make install and everything gets compiled. Next download SFGUI's sourcecode and repeate. Done.
Not without the dev packages of all the SFML dependencies :P
Title: Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
Post by: eXpl0it3r on April 27, 2012, 11:52:21 pm
He needs them to install the dependencies, not to compile anything.
Not on Linux!
Not without the dev packages of all the SFML dependencies :P

Yeah I kind of realized that too after posting it... ;D
So the only way would be to get root priviliges and install the dev libs? Or is there a way where you'd be able to download the libs speratly and then compile against those?
Title: Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
Post by: Tank on April 29, 2012, 04:36:36 pm
The ideal solution would be to use a system's package manager. But at least SFGUI isn't maintained in any, so you have to either include SFGUI sources with your project or, if you're distributing in binary form, link statically so that the required SFGUI code is directly linked in.

One advantage of using CMake for your own project is that you can specify where to look for libraries. Makes it relatively easy to include dependencies in your project, build them separately and then direct CMake to look for the libs in your project's dependency directory.