+ -
当前位置:首页 → 问答吧 → linux 下编程 nachos

linux 下编程 nachos

时间:2011-07-23

来源:互联网

我写了一个c++的双向链表 然后对threadtest.cc做了修改

make之后 出现了下面的情况 不知道怎么修改 请各位高手帮忙!!

g++ -g -Wall -Wshadow -traditional -I../threads -I..
/machine -DTHREADS -DHOST_i386 -DCHANGED -c ../threads/threadtest.cc

In file included from /usr/include/c++/3.2.2/cstdlib:52,

  from /usr/include/c++/3.2.2/bits/stl_algobase.h:67,
   
  from /usr/include/c++/3.2.2/memory:54,
   
  from /usr/include/c++/3.2.2/string:48,
 
  from /usr/include/c++/3.2.2/bits/localefwd.h:49,
   
  from /usr/include/c++/3.2.2/ios:48,
   
  from /usr/include/c++/3.2.2/ostream:45,
   
  from /usr/include/c++/3.2.2/iostream:45,
   
  from ../threads/threadtest.cc:15:

/usr/include/stdlib.h:142: declaration of `double atof(const char*) throw ()'
   
throws different exceptions
..
/machine/sysdep.h:62: than previous declaration `double atof(const char*)'

/usr/include/stdlib.h:144: declaration of `int atoi(const char*) throw ()'
 
  throws different exceptions
..
/machine/sysdep.h:61: than previous declaration `int atoi(const char*)'

In file included from /usr/include/c++/3.2.2/cstdlib:52,
   
  from /usr/include/c++/3.2.2/bits/stl_algobase.h:67,
  
  from /usr/include/c++/3.2.2/memory:54,

  from /usr/include/c++/3.2.2/string:48,

  from /usr/include/c++/3.2.2/bits/localefwd.h:49,

  from /usr/include/c++/3.2.2/ios:48,

  from /usr/include/c++/3.2.2/ostream:45,

  from /usr/include/c++/3.2.2/iostream:45,

  from ../threads/threadtest.cc:15:

/usr/include/stdlib.h:742: declaration of `int abs(int) throw ()'
 throws
  different exceptions
..
/machine/sysdep.h:63: than previous declaration `int abs(int)'

make: *** [threadtest.o] Error 1

作者: fish_zyu   发布时间: 2011-07-23

linux下C++文件名后缀是.cc吗?我糊涂了。

作者: wyjq395   发布时间: 2011-07-23