Jump to content

error trying to compile SDIinvaders


Guest dturley
 Share

Recommended Posts

Guest dturley

not sure what devel rpm I'm missing:

 

david:~/src/SDLInvaders$ make

gcc -Wall -ansi -pedantic -g `sdl-config --cflags --libs` -Wall -ansi -pedantic -lSDL_image -lSDL_mixer -o SDLInvaders main.c graphics.c SFont.c alien.c weapons.c music.c

/usr/bin/ld: cannot find -lasound

collect2: ld returned 1 exit status

make: *** [sDLInvaders] Error 1

Link to comment
Share on other sites

Well, from ML9.0, I couldn't find a lasound, but I foung asound

{bvc9 11:27 PM bvc9}>urpmf lasound

{bvc9 11:28 PM bvc9}>urpmf asound

libalsa2:/usr/lib/libasound.so.2

libalsa2:/usr/lib/libasound.so.2.0.0

kernel-headers:/usr/include/linux/ultrasound.h

kernel-headers:/usr/include/sound/asound.h

kernel-headers:/usr/include/sound/asound_fm.h

kernel-headers:/usr/include/sound/asoundef.h

glibc-devel:/usr/include/sys/ultrasound.h

libalsa2-devel:/usr/include/alsa/asoundef.h

libalsa2-devel:/usr/include/alsa/asoundlib.h

libalsa2-devel:/usr/include/sys/asoundlib.h

libalsa2-devel:/usr/lib/libasound.la

libalsa2-devel:/usr/lib/libasound.so

howto-html-pl:/usr/share/doc/HOWTO/HTML/pl/mini/GravisUltrasound.pl.html

kernel-doc:/usr/share/doc/kernel-doc-2.4.19/sound/ultrasound

xfig:/usr/X11R6/lib/X11/xfig/Libraries/Hospital/ultrasound.fig

kernel-source:/usr/src/linux-2.4.19-16mdk/Documentation/sound/ultrasound

kernel-source:/usr/src/linux-2.4.19-16mdk/drivers/sound/dmasound

Link to comment
Share on other sites

"-lasound" means the following :

"find libasound.a or libasound.la or libasound.so within some predefined library directories".

Within this : "-l" means "find a library" ( it is a linker switch ), "asound" is the key part of the library name. The full library name is made of the key part by prefixing it with "lib".

Examples :

-lm tells the linker to find libm.so.

-lXm tells the linker to find libXm.so.

Link to comment
Share on other sites

Guest dturley

Hence the next question. :-)

 

Seems I have libasound:

 

locate libasound

/usr/lib/libasound.so.1.0.1

/usr/lib/libasound.so.1

 

 

cat /etc/ld.so.conf

/usr/X11R6/lib

/usr/lib/qt2/lib

/usr/local/lib

/usr/local

/usr/lib

/usr/include/gdk-pixbuf-1.0

Link to comment
Share on other sites

Guest dturley

Turns out I needed to do:

ln -s /usr/lib/libasound.so.1.0.1 /usr/lib/libasound.so

 

and it compiled. But t durn thing seg faulted on launch and forced X back to 800x640 . So it wasn't worth it anyway. :-/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...