Quote:
Originally Posted by smallpond
Please don't retype errors. There's an obvious typo in what you provided and you are providing the last (least intersting) line instead of the first (most interesting) line.. Paste the full text of the error in the post.
|
ok, i retype this:
main.c: In function 'new_alien':
main.c:522:41: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (!galiens[(NUM_INVADERS+1)].health > 0 && the_fighter.mayshoot) {
weapons.c: In function 'specialWeapon_launch':
weapons.c:216:35: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while((!galiens[r].health > 0 ¦¦ galiens[r].alien_type != 0) &&
Quote:
Originally Posted by ponce
the error looks to be this
Code:
weapons.c:216:35: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while((!galiens[r].health > 0 || galiens[r].alien_type != 0) &&
^
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: /tmp/ccR1xAHB.o: undefined reference to symbol 'sqrt@@GLIBC_2.2.5'
/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:9: recipe for target 'SDLInvaders' failed
make: *** [SDLInvaders] Error 1
you can fix that opening the Makefile and changing the CFLAGS from
Code:
CFLAGS=-g `sdl-config --cflags --libs` -Wall -ansi -pedantic -lSDL_image
to
Code:
CFLAGS=-g `sdl-config --cflags --libs` -Wall -ansi -pedantic -lSDL_image -lm
then you can use again the "make" command.
|
yes, thanks, it is work. and one more thing: when i leave game i have Mix_LoadMUS("data/pennight.mod") Unrecognized music format . it is normal?