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

Author Topic: Link Error  (Read 5809 times)

0 Members and 1 Guest are viewing this topic.

mitsuharu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Link Error
« on: October 05, 2011, 07:53:32 am »
I've been here pretty much banging my head for the past couple of hours trying to build PySFML without success on my OSX Lion machine.  I have followed the tutorial and compiled the 2.0 SFML snapshot.  I compiled the examples along with that, and those work perfectly fine.  I even re-compiled the for the static release library and the debug compilations. (Which I saw a forum post stating that was bad, but I don't know why)

Now I'm no expert to linking libraries or compiling from the command line, but when I go to compile the python bindings, I always get a linker error.  The same error occurs if I try to compile a small test file from the command line.


Here's the snippet from terminal:
Code: [Select]

bash-3.2$ sudo python setup.py build
running build
running build_ext
skipping 'sf.cpp' Cython extension (up-to-date)
building 'sf' extension
/Developer/usr/bin/llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c sf.cpp -o build/temp.macosx-10.7-x86_64-2.7/sf.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
sf.cpp: In function ‘PyObject* __pyx_pf_2sf_11SoundBuffer_7samples___get__(PyObject*)’:
sf.cpp:8523: warning: comparison between signed and unsigned integer expressions
/Developer/usr/bin/llvm-g++-4.2 -bundle -undefined dynamic_lookup -isysroot / -L/opt/local/lib build/temp.macosx-10.7-x86_64-2.7/sf.o -lsfml-graphics -lsfml-window -lsfml-audio -lsfml-system -o build/lib.macosx-10.7-x86_64-2.7/sf.so
ld: library not found for -lsfml-graphics
collect2: ld returned 1 exit status
error: command '/Developer/usr/bin/llvm-g++-4.2' failed with exit status 1

Rukiri

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Link Error
« Reply #1 on: October 05, 2011, 02:45:44 pm »
make sure that your Libary files are in the pythons libs folder.

mitsuharu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Link Error
« Reply #2 on: October 05, 2011, 08:04:17 pm »
I don't think that's quite it because this is an issue with GCC.  I haven't even created the bindings at this point.

*EDIT*
Well I have gotten it to work by redoing the release builds.  I'm not sure what went wrong the first time, but everything works fine now.