my main.cc file is
Code: Select all
/* Created by Anjuta version 1.0.2 */
/* This file will not be overwritten */
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
int main()
{
printf("[Initializing]\n");
SDL_Surface *screen;
if( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
printf("\tCouldn't initialize SDL: %s\n", SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
return EXIT_SUCCESS;
}
Code: Select all
.
.
.
/bin/sh ./libtool --mode=link c++ -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -g -o game main.o
c++ -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -g -o
main.o: In function `main':
/home/saquib/Projects/Game/src/main.cc:13: undefined reference to 'SDL_Init'
/home/saquib/Projects/Game/src/main.cc:15: undefined reference to 'SDL_GetError'
/home/saquib/Projects/Game/src/main.cc:18: undefined reference to 'SDL_Quit'
collect2: ld returned 1 exit status
make[2]: *** [game] Error 1
make[2]: Target `all' not remade because of errors.
.
.
.
[saquib@localhost saquib]$ uname -a
Linux localhost.localdomain 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
[saquib@localhost saquib]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
[saquib@localhost saquib]$ c++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
[saquib@localhost saquib]$
any1 knows that what is problem here or anything missing