Jump to content

programming linux games


Recommended Posts

Hi, I downloaded the plg book from here

http://isengard.overcode.net/~overcode/writing/plg/

 

anyway looks like a good book and i will be able to get a hardcopy here in New Zealand, it will just take a while to get here.

 

Has anyone gotten the example game to compile in mandrake 9.0?

I have looked at all the include files needed and i seem to have them all, but i can't get any examples with sound to work.

 

heres console output of when i try to compile something with sound:

[john@bobs pw-final]$ make pw

gcc -W -Wall -ggdb `sdl-config --cflags` -c audio.c

gcc -W -Wall -ggdb `sdl-config --cflags` -c music.c

gcc -W -Wall -ggdb `sdl-config --cflags` -c main.c

gcc -W -Wall -ggdb `sdl-config --cflags` -c particle.c

gcc -W -Wall -ggdb `sdl-config --cflags` -c background.c

gcc -W -Wall -ggdb `sdl-config --cflags` -c resources.c

resources.c: In function `LoadSoundFile':

resources.c:122: warning: implicit declaration of function `sf_open_read'

resources.c:122: warning: assignment makes pointer from integer without a cast

resources.c:129: `SF_FORMAT_PCM' undeclared (first use in this function)

resources.c:129: (Each undeclared identifier is reported only once

resources.c:129: for each function it appears in.)

resources.c:135: structure has no member named `pcmbitwidth'

resources.c:137: structure has no member named `pcmbitwidth'

resources.c:139: structure has no member named `pcmbitwidth'

resources.c:141: structure has no member named `pcmbitwidth'

resources.c:150: structure has no member named `samples'

resources.c:154: structure has no member named `samples'

resources.c:156: structure has no member named `pcmbitwidth'

resources.c:166: structure has no member named `samples'

resources.c:172: structure has no member named `samples'

resources.c:173: structure has no member named `pcmbitwidth'

resources.c:183: structure has no member named `samples'

resources.c:183: structure has no member named `pcmbitwidth'

make: *** [resources.o] Error 1

[john@bobs pw-final]$

Link to comment
Share on other sites

  • 2 weeks later...

After looking around i discovered that libsndfile's api has changed a bit, some of the functions have be dropped and replaced with new functions.

 

So either i have to revert back to an older libsndfile if i can find one that works or change the source code to reflect the changes in the api (and i am a c n00b), or contact the author and see if i can get him too change some source code for me.

 

Oh well joys to be me :cry:

 

Oh yes i got the hardcopy for this book, it was in a decent bookstore, i was amazed to see it there though.

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...