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

Pages: [1]
1
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 27, 2012, 12:18:03 pm »
Some googling suggests it's a 64bit linking issue. (I am on 64bit ubuntu) :P

Compiling them into static libs works fine, so long as the two instances of NULL are replaced with 0 inside /SFML-1.6/include/SFML/system/ResourcePtr.int.

Either way, I can use the dynamic libs that come with SFML or compile my own static. Both works fine thanks to your help. ^^

These strange quarks are fun. :P

2
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 27, 2012, 09:09:45 am »
That works. :D :D

But I have come across another problem! When compiling SFML 1.6 from scratch. Following the tutorial here: http://www.sfml-dev.org/tutorials/1.6/start-linux.php

When I run the make command i get this:

make[1]: Entering directory `/home/me/SFML-1.6/src/SFML'
make[2]: Entering directory `/home/me/SFML-1.6/src/SFML/System'
g++ -shared -Wl,-soname,libsfml-system.so.1.6 -o ../../../lib/libsfml-system.so.1.6 Clock.o Lock.o Randomizer.o Sleep.o Unicode.o ./Unix/Initializer.o ./Unix/Mutex.o ./Unix/Platform.o ./Unix/Thread.o -lpthread
/usr/bin/ld: Unicode.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
Unicode.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libsfml-system.so] Error 1
make[2]: Leaving directory `/home/me/SFML-1.6/src/SFML/System'
make[1]: *** [sfml-system] Error 2
make[1]: Leaving directory `/home/me/SFML-1.6/src/SFML'
make: *** [sfml] Error 2


3
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 26, 2012, 01:12:04 pm »
Yes. That has worked. It now compiles into a executable file. :)

I am a little confused on the next step. I have copied  libsfml-system.so.1.6 into say "/home/me/game/lib" and produced a  libsfml-system.so file in the same folder which links to  "/home/me/game/lib/libsfml-system.so.1.6" . the compile option "-L/home/me/game/lib/ -lsfml-system " works.


But when I attempt to execute the clock app by "./clock" it produces:

 ./clock: error while loading shared libraries: libsfml-system.so.1.6: cannot open shared object file: No such file or directory

I can run export "LD_LIBRARY_PATH=/home/me/game/lib" and it does work. But I want it to be fully portable. So it works on any ubuntu system that does not have SFML installed or the SFML LD path set up like that. In Windows I'd just put the .dll files into the same folder as the .exe file. What is needed in Ubuntu?

Thanks.

4
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 26, 2012, 11:47:52 am »
Okay, everything is working fine on Windows now. But on Ubuntu I still have a linking issues. I have the clock.cpp sample. I have SFML 1.6 installed in /home/me/SFML-1.6/

In terminal I type the following:

g++ -c clock.cpp -I/home/me/SFML-1.6/include

This works fine. And produces clock.o.

Then I enter:   g++ clock.o -o clock -L/home/me/SFML-1.6/lib -lsfml-system

Which produces: /usr/bin/ld: cannot find -lsfml-system

The directory /home/me/SFML-1.6/lib has the following files within it.

libsfml-audio.so.1.6
libsfml-network.so.1.6
libsfml-window.so.1.6
libsfml-graphics.so.1.6
libsfml-system.so.1.6


Any ideas...?

5
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 25, 2012, 09:46:39 am »
If the ATI/AMD bug only effects windows than static wont be needed for linux. I've fixed the windows static problem, I re-read the tutorial and it seems codeblocks didn't have the right version of mingw  as default. ._.

How would I set gcc/g++ to check a directory in a terminal for the headers on Ubuntu?

6
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 25, 2012, 09:01:21 am »
The ATI bug is only on Windows ;)

Quote
"/home/dean/SFML-1.6/lib"
If your home folder is "tillis", that would explain your problem :P

The directory names are all correct in code blocks. :P But code blocks just produces error messages saying it can't find "-lsfml-system" on Ubuntu.

As for my Windows install . Codeblocks is set up the same as on ubuntu, but it actually does find the libraries and compiles.  but when I try "-lsfml-system-s" it says it can't find "-lsfml-system-s".

7
General / Re: Code Blocks and Ubuntu + Static linking
« on: April 25, 2012, 07:13:26 am »
I have an AMD GPU, So SFML 1.6 apps hang unless they are staticly linked. So I really need it at the moment.

I can get it running without the windows or graphics modules if the libs are in the /usr/local/ directories. But I would prefer it if they were in directories within my home folder.


8
General / Code Blocks and Ubuntu + Static linking
« on: April 25, 2012, 05:25:42 am »
Hi. I have two issues.

Firstly, I am trying to get SFML 1.6 to work using Code Blocks on Ubuntu. I have followed the codeblocks tutorial on the website. I've added "/home/tillis/SFML-1.6/include" in compiler directory and "/home/tillis/SFML-1.6/lib" to the linker directory. "tillis" being my actual user name. :P  In Linker settings I have added "-lsfml-system". I am trying to compile the clock sample.

Then I click build I get this message:   cannot find -lsfml-system

It does work when the sfml files are in the /usr/local/ directories. But I specifically want to link them from my own home directories.

Secondly,  even when SFML is in the /usr/local/ directories. I am trying to static link them using the "-lsfml-system-s" option, but this results in the error message "cannot find -lsfml-system-s".

What am I doing wrong here? : S

Pages: [1]
anything