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

Author Topic: Golang, cgo, gosml2, csfml linking problem  (Read 1171 times)

0 Members and 1 Guest are viewing this topic.

MyOwnBitch

  • Newbie
  • *
  • Posts: 5
    • View Profile
Golang, cgo, gosml2, csfml linking problem
« on: January 22, 2014, 05:09:31 pm »
Hi all,

Do we have any golang ninjas at the forum?

I have a really annoying problem with cgo, csfml and gosfml2 that is related to linking...

Somehow it doesn't find the libs when building gosfml2 with CGO_CFLAGS=-I/usr/local/include CGO_LDFLAGS=-L/usr/lib go build -a -x.

The last rows of output:
$WORK/bitbucket.org/krepa098/gosfml2/_obj/window.cgo2.o -L/usr/lib -lcsfml-window -lcsfml-graphics -lcsfml-audio
# bitbucket.org/krepa098/gosfml2
ld: library not found for -lcsfml-window
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I ls -l /usr/lib:
libcsfml-window.2.1.dylib
libcsfml-window.2.dylib -> libcsfml-window.2.1.dylib
libcsfml-window.dylib -> libcsfml-window.2.dylib

The lib are clearly there. I'm going nuts, what am I missing?

/Fredrik

 

anything