LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-24-2016, 08:32 AM   #1
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Rep: Reputation: 1
compiling SDLInvaders 0.7.6 error


i tried to compile SDLInvaders 0.7.6 and get collect2: error: id returned 1 exit status . how can i fix it?
 
Old 07-24-2016, 09:16 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
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.
 
Old 07-24-2016, 11:21 AM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
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.
 
2 members found this post helpful.
Old 07-26-2016, 08:58 AM   #4
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by smallpond View Post
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 View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error compiling 'foto'. [error adding symbols: DSO missing from command line] 313 Linux - Software 1 02-04-2014 07:45 AM
Fedora 9: error when compiling flash plug-in with error failed dependencies seow_ming Fedora 2 06-17-2008 07:17 PM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - General 1 12-11-2007 06:54 AM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - Newbie 0 12-11-2007 06:49 AM
i get an error ./term.c :95 error conflicting types of tpam when compiling bitchx eveningblush Programming 0 03-30-2006 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration