wiki:wade/gcc

Version 5 (modified by wade, 16 years ago) (diff)

--

Packages and libraries

Install C/C++ compiler, packages and libraries.

  sudo apt-get install build-essential

Error

off64_t 無法宣告

Reason:linking time error,使用 32 BITS 機器。 Reference:http://gcc.gnu.org/ml/gcc-bugs/2006-11/msg00651.html
Solution:請加上

-Wall -D_LARGEFILE64_SOURCE 

例如:

gcc -D_LARGEFILE64_SOURCE -o test test.c