That usually happens when I add something after #include.

for example

#include "TychoEvent.hh".
#include "TychoEvent.hh" ;

Simply remove . or ;!

'Computer > linux' 카테고리의 다른 글

how to add group  (0) 2009.09.30
warning: extra tokens at end of #include directive  (0) 2009.07.12
add a user to a specific group  (0) 2009.06.29
cdrecord that is a command line cd recording tool (Linux)  (0) 2009.06.25
posted by citadel
Problem :

When I try to compile c program, I met the following error message:
warning: incompatible implicit declaration of built-in function ‘strstr’

Analysis :

This means that no header file contains the strstr function that I use in the program.

Solution : 

Add the header file  according to my function (strstr)
#include <string.h>

posted by citadel
After upgrading gcc version 4.2.3 20071014 (prerelease) (Debian 4.2.2-3),
there are a lot of warning message as

 warning: deprecated conversion from string constant to 'char*'

To add const before char*, the warning message was gone.
void    nrerror(const char *error_text);

void nrerror(const char *error_text)
  /* Numerical Recipes standard error handler */
  fprintf(stderr,"Numerical Recipes run-time error...\n");
  fprintf(stderr,"%s\n", error_text);
  fprintf(stderr," exiting to system...\n");

 warning:  comparison with string literal results in unspecified behaviour
 To change the way the check two string pointers,
 char *Wire_Type;
from if (Wire_Type == "scC")

to  if (!(strcmp(Wire_Type, "scC")))

posted by citadel