OK, understood. Thank you.
- Viewing Profile: Posts: Wonder Boy
Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics
Community Stats
- Group Members
- Active Posts 7
- Profile Views 511
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
110
Neutral
User Tools
Contacts
Wonder Boy hasn't added any contacts yet.
Latest Visitors
Posts I've Made
In Topic: How to delete an account
18 March 2013 - 11:12 AM
In Topic: How to delete an account
17 March 2013 - 03:35 PM
@Cornstalks: thanks
In Topic: How to delete an account
17 March 2013 - 03:30 PM
Contacted support. Why this have to be so painful?
In Topic: [SOLVED] My game doesn't detect libpng in its directory (game packaging)
21 June 2012 - 07:29 PM
Solution:
I have to include '-rpath' flag with a specified directory in the command above so the directory will be searched at the runtime.
For example:
search the same dir as executable dir: -Wl,-rpath,.
search "libs" directory inside directory where is located executable: -Wl,-rpath,libs/
So now my command looks like this:
Useful commands:
Check which libraries will be loaded by the executable at runtime:
Sources:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
http://www.eyrie.org/~eagle/notes/rpath.html
http://www.techytalk.info/c-cplusplus-library-programming-on-linux-part-one-static-libraries/ (3 parts)
in terminal: man ld
I have to include '-rpath' flag with a specified directory in the command above so the directory will be searched at the runtime.
For example:
search the same dir as executable dir: -Wl,-rpath,.
search "libs" directory inside directory where is located executable: -Wl,-rpath,libs/
So now my command looks like this:
g++ *.cpp -I/my_include_dir/ -L/my_lib_dir/ -lSDL_image -lSDL_ttf -lSDL_mixer -lSDL -lpthread -ldl -lfreetype -lz -Wl,-rpath,. -o build/tictactoe32 -m32
Useful commands:
Check which libraries will be loaded by the executable at runtime:
ldd <binary>Check which directories will be searched for libraries:
readelf -d <binary> | grep RPATH
Sources:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
http://www.eyrie.org/~eagle/notes/rpath.html
http://www.techytalk.info/c-cplusplus-library-programming-on-linux-part-one-static-libraries/ (3 parts)
in terminal: man ld
In Topic: [SOLVED] My game doesn't detect libpng in its directory (game packaging)
21 June 2012 - 07:34 AM
Hi, thanks for the answer.
I don't use libpng directly in my code, it is loaded by SDL_image at runtime, when needed to load different kinds of images (png in this case). I use only SDL_image.
I don't use libpng directly in my code, it is loaded by SDL_image at runtime, when needed to load different kinds of images (png in this case). I use only SDL_image.
- Home
- » Viewing Profile: Posts: Wonder Boy

Find content