Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFBL (SFML Box2D Light)  (Read 19798 times)

0 Members and 1 Guest are viewing this topic.

Mj PsykOo

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: SFBL (SFML Box2D Light)
« Reply #15 on: January 28, 2015, 11:02:44 pm »

Well I've started working on it, but I've never compiled a library without the use of a build system that configured it to compile.  I think I'm close, but still getting an error.  Not sure if I should start a new thread, but I'll post it here for now :

Code: [Select]
/usr/bin/g++   -c  "/home/spirro/C++Work/sfbl/sfbl.cpp" -g -O0 -std=c++11 -Wall  -o ./Debug/sfbl.cpp.o -I. -I/usr/include -I/usr/local/include
/usr/bin/g++ -shared -fPIC -o ./Debug/sfbl.so @"sfbl.txt" -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib  -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
/usr/bin/ld: ./Debug/sfbl.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
./Debug/sfbl.cpp.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [Debug/sfbl.so] Error 1
make[1]: Leaving directory `/home/spirro/C++Work/sfbl'

It tells me to recompile with -fPIC, but, as you can see, that -fPIC is in there.  Now whether or not it's in the right place, I'm still unsure and checking.

try this solution:
http://stackoverflow.com/questions/9541609/using-linux-c-shared-and-static-libraries-in-a-same-program

Spirro

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: SFBL (SFML Box2D Light)
« Reply #16 on: January 28, 2015, 11:31:11 pm »
try this solution:
http://stackoverflow.com/questions/9541609/using-linux-c-shared-and-static-libraries-in-a-same-program

Thanks, but afaik everything is dynamic other than the precompiled libs you provide.  I'm just trying to make dynamic libs.

Mj PsykOo

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: SFBL (SFML Box2D Light)
« Reply #17 on: January 29, 2015, 12:51:31 am »
try this solution:
http://stackoverflow.com/questions/9541609/using-linux-c-shared-and-static-libraries-in-a-same-program

Thanks, but afaik everything is dynamic other than the precompiled libs you provide.  I'm just trying to make dynamic libs.

I think it's better to link it statically rather than dynamically for avoiding necessity of presence of compiled binary(.so).

Spirro

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: SFBL (SFML Box2D Light)
« Reply #18 on: January 29, 2015, 01:37:12 am »
I think it's better to link it statically rather than dynamically for avoiding necessity of presence of compiled binary(.so).

For usage under a windows environment I would agree, but to my knowledge linux differs and prefers shared libs over static libs.  I hate to keep diluting your thread for your lib with this discussion, but I think we both would like your lib to be usable by all.  Hence my initial reticence in posting my trouble compiling your lib in a linux environment here.

coquinounet

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFBL (SFML Box2D Light)
« Reply #19 on: April 14, 2015, 11:23:32 am »
Hello, i've found your awesome library and i've integrated it in my game. It's a tile based game, but it's doing weird thing like the image i've attached. Is there a way to fix it ? Thanks
« Last Edit: April 14, 2015, 04:49:27 pm by coquinounet »

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: SFBL (SFML Box2D Light)
« Reply #20 on: April 14, 2015, 02:01:58 pm »
Hello, i've found your awful library and i've integrated it in my game. It's a tile based game, but it's doing weird thing like the image i've attached. Is there a way to fix it ? Thanks
Awful, are you sure?

SpeCter

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: SFBL (SFML Box2D Light)
« Reply #21 on: April 14, 2015, 02:13:05 pm »
My best guess would be that he meant in in a pretty archaic meaning(like awe-inspriring -> awesome).

coquinounet

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFBL (SFML Box2D Light)
« Reply #22 on: April 14, 2015, 04:51:03 pm »
Awful, are you sure?
Sorry, i was not sure with this word, i edited my post, i'm not english native speaker  ;D
« Last Edit: April 14, 2015, 04:52:44 pm by coquinounet »

 

anything