Difference between revisions of "Fs2 open on Linux/SDL: undefined reference to ..."

From FreeSpace Wiki
Jump to: navigation, search
(New page: This is a SDL installing issue, since it's trying to link against the static lib and not the dynamic one. First check where <tt>/usr/lib/libSDL.so</tt> is linked to, then search this very ...)
 
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{Page Navigation|
 +
BookName=[[The fs2_open on Linux Guide]]|
 +
CurrentPage=SDL: undefined reference to ...|SDL: undefined reference to ...|
 +
PrevPage=[[Fs2_open on Linux/Novell SuSE and the Dependencies|Novell SuSE and the Dependencies]]|
 +
NextPage=[[Fs2_open on Linux/Missing -lGLU compile error|Missing -lGLU compile error]]}}
 +
<p></p>
 
This is a SDL installing issue, since it's trying to link against the static lib and not the dynamic one.
 
This is a SDL installing issue, since it's trying to link against the static lib and not the dynamic one.
 
First check where <tt>/usr/lib/libSDL.so</tt> is linked to, then search this very file.
 
First check where <tt>/usr/lib/libSDL.so</tt> is linked to, then search this very file.
Line 9: Line 15:
 
  # ln -s /usr/lib/libSDL-1.2.so.0.7.2 /usr/lib/libSDL.so
 
  # ln -s /usr/lib/libSDL-1.2.so.0.7.2 /usr/lib/libSDL.so
 
Of course you must change some figures, so it matches on your system.
 
Of course you must change some figures, so it matches on your system.
 +
 +
[[Category:FreeSpace Open on Linux|SDL undefined reference]]

Latest revision as of 18:22, 24 September 2008

« Novell SuSE and the Dependencies The fs2_open on Linux Guide
SDL: undefined reference to ...
Missing -lGLU compile error »

This is a SDL installing issue, since it's trying to link against the static lib and not the dynamic one. First check where /usr/lib/libSDL.so is linked to, then search this very file.

$ ls -l /usr/lib/libSDL.so
lrwxrwxrwx  1 root root 28 2006-09-06 00:10 /usr/lib/libSDL.so -> 
  /usr/lib/libSDL-1.2.so.0.7.1
$ ls /usr/lib/ | grep libSDL-1.2.so.0.7
libSDL-1.2.so.0.7.2

If they are not the same (like in this case), you just make a new link. Type as root:

# ln -s /usr/lib/libSDL-1.2.so.0.7.2 /usr/lib/libSDL.so

Of course you must change some figures, so it matches on your system.