This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc does not work on mac os x
- From: tanne <dietanne at gmx dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 18 Jan 2004 23:31:14 -0700
- Subject: gcc does not work on mac os x
hi!
i don't know if i'm contacting the right persons but i really get nuts
so please
don't be angry!
i'm trying to do program c++ on my ibook with mac os x.
but this is not working!
i use xcode as editor, because i already know that emacs is at the
moment
only working in the xterm window, and i am trying to compile a simple
main-program,
but when i start using libs, e.g. like iostream, i get 100 of errors,
because
some .h files are needed and in the directory are only the files
without .h.
i copyandpaste one typical error, perhaps someone can help me:
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++locale.h:41,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:46,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/clocale:49:20: locale.h: No such file
or directory
i'm using a .cpp file and i tried gcc and g++ but the results are
always the same!
this is the code:
#include <iostream>
int main()
{
cout << "hallo";
return 0;
}
and it is working fine if i delete the include and the cout statement!
i hope you don't mind for real programmers this is perhaps a stupid
error, but
i don't know what to do!
or perhaps you could give me a hint who can help me!
thank you so much,
tanja
here is the full error message:
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++locale.h:41,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:46,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/clocale:49:20: locale.h: No such file
or directory
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++locale.h:41,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:46,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/clocale:57: error: `lconv' not declared
/usr/include/gcc/darwin/3.3/c++/clocale:58: error: `setlocale' not
declared
/usr/include/gcc/darwin/3.3/c++/clocale:59: error: `localeconv' not
declared
In file included from /usr/include/gcc/darwin/3.3/c++/iosfwd:47,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/cctype:49:19: ctype.h: No such file or
directory
In file included from /usr/include/gcc/darwin/3.3/c++/iosfwd:47,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/cctype:100: error: `tolower' not
declared
/usr/include/gcc/darwin/3.3/c++/cctype:101: error: `toupper' not
declared
In file included from /usr/include/gcc/darwin/3.3/c++/cstdio:50,
from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:35,
from /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/cstddef:48:20: stddef.h: No such file
or directory
In file included from /usr/include/gcc/darwin/3.3/c++/cstdio:50,
from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:35,
from /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/cstddef:52: error: `ptrdiff_t' not
declared
/usr/include/gcc/darwin/3.3/c++/cstddef:53: error: `size_t' not declared
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:35,
from /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/cstdio:52:19: stdio.h: No such file or
directory
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:35,
from /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/cstdio:99: error: `FILE' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:100: error: `fpos_t' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:102: error: `clearerr' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:103: error: `fclose' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:104: error: `feof' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:105: error: `ferror' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:106: error: `fflush' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:107: error: `fgetc' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:108: error: `fgetpos' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:109: error: `fgets' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:110: error: `fopen' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:111: error: `fprintf' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:112: error: `fputc' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:113: error: `fputs' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:114: error: `fread' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:115: error: `freopen' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:116: error: `fscanf' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:117: error: `fseek' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:118: error: `fsetpos' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:119: error: `ftell' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:120: error: `fwrite' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:121: error: `getc' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:122: error: `getchar' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:123: error: `gets' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:124: error: `perror' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:125: error: `printf' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:126: error: `putc' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:127: error: `putchar' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:128: error: `puts' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:129: error: `remove' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:130: error: `rename' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:131: error: `rewind' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:132: error: `scanf' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:133: error: `setbuf' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:134: error: `setvbuf' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:135: error: `sprintf' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:136: error: `sscanf' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:137: error: `tmpfile' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:138: error: `tmpnam' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:139: error: `ungetc' not declared
/usr/include/gcc/darwin/3.3/c++/cstdio:140: error: `vfprintf' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:141: error: `vprintf' not
declared
/usr/include/gcc/darwin/3.3/c++/cstdio:142: error: `vsprintf' not
declared
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr.h:98,
from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:37,
from /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:37:21:
pthread.h: No such file or directory
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:38:20:
unistd.h: No such file or directory
In file included from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr.h:98,
from
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:37,
from /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
from /usr/include/gcc/darwin/3.3/c++/ios:44,
from /usr/include/gcc/darwin/3.3/c++/ostream:45,
from /usr/include/gcc/darwin/3.3/c++/iostream:45,
from test.cpp:1:
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:40:
error: syntax
error before `;' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:41:
error: syntax
error before `;' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:42:
error: syntax
error before `;' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:450:
error: `
__gthread_once_t' was not declared in this scope
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:450:
error: `
once' was not declared in this scope
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:450:
error: `
func' was not declared in this scope
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:450:
error: parse
error before `)' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:450:
error: `
__gthread_once' declared as an `inline' variable
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:450:
error: syntax
error before `)' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:459:
error: `
__gthread_key_t' was not declared in this scope
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:459:
error: `key
' was not declared in this scope
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:459:
error: `
dtor' was not declared in this scope
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:459:
error: parse
error before `*' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h: In
function `
int __gthread_key_create(...)':
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:465:
error: `
__gthread_key_t' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:465:
error: (Each
undeclared identifier is reported only once for each function it
appears
in.)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:465:
error: parse
error before `,' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:466:
error: cannot
declare static function inside another function
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h: In
function `
int __gthread_key_dtor(...)':
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:468:
error: `ptr
' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:469:
error: `key
' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:469:
error: `
pthread_setspecific' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:475:
error: parse
error before `)' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:476:
error: cannot
declare static function inside another function
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h: In
function `
int __gthread_key_delete(...)':
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:477:
error: `
pthread_key_delete' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:481:
error: parse
error before `)' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:482:
error: cannot
declare static function inside another function
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h: In
function `
void* __gthread_getspecific(...)':
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:483:
error: `
pthread_getspecific' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:487:
error: parse
error before `,' token
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:488:
error: cannot
declare static function inside another function
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h: In
function `
int __gthread_setspecific(...)':
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:493:
error: `
__gthread_mutex_t' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:493:
error: `
mutex' undeclared (first use this function)
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:494:
error: `
__gthread_mutex_lock' declared as an `inline' variable
/usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:494:
confused by earlier errors, bailing out