banthar / Go-SDL

Go bindings for SDL
218 stars 68 forks source link

"Package SDL_ttf was not found in the pkg-config search path." #35

Open zippoxer opened 13 years ago

zippoxer commented 13 years ago

The output of calling make:

gomake -C sdl
make[1]: Entering directory `/root/Go-SDL/sdl'
make[1]: Leaving directory `/root/Go-SDL/sdl'
gomake -C ttf
make[1]: Entering directory `/root/Go-SDL/ttf'
CGOPKGPATH=sdl cgo --  ttf.go
Package SDL_ttf was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL_ttf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL_ttf' found
ttf.go: bad #cgo option pkg-config: pkg-config failed
make[1]: *** [_obj/_cgo_run] Error 2
make[1]: Leaving directory `/root/Go-SDL/ttf'
make: *** [all] Error 2

I do have libsdl-ttf-dev installed. I do not have the file SDL_ttf.pc anywhere on my only hard drive. I do not know why it's happening to me.

mogoh commented 13 years ago

I've got the same problem and also no Idea.

bmatsuo commented 13 years ago

Also a problem for me on Ubuntu Lucid.

zombieCraig commented 12 years ago

I had the same problem on my Ubuntu system. I created two files by hand SDL_ttf.pc and SDL_mixer.pc. I then copied them to /usr/lib/pkgconfig and all worked fine. Below is the contents of the two files:

SDL_ttf.pc

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: SDL_ttf
Description: ttf library for Simple DirectMedia Layer with FreeType 2 support
Version: @VERSION@
Requires: sdl >= @SDL_VERSION@
Libs: -L${libdir} -lSDL_ttf
Cflags: -I${includedir}/SDL

SDL_mixer.pc

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: SDL_mixer
Description: mixer library for Simple DirectMedia Layer
Version: @VERSION@
Requires: sdl >= @SDL_VERSION@
Libs: -L${libdir} -lSDL_mixer
Cflags: -I${includedir}/SDL

Note I haven't tested Go-SDL yet just saw that it compiled fine.

ghost commented 11 years ago

Ubuntu 12.10 (quantal) appears to be shipping with SDL_ttf.pc.

http://packages.ubuntu.com/quantal/i386/libsdl-ttf2.0-dev/filelist

trosh commented 11 years ago

@zombieCraig not sure what witchcraft you used but this solves everything (at least on my #! distro). thumbs up.