error: ‘int64_t’ does not name a type

我在CodeBlock中编译工程没有出现问题,但是放到ubuntu上用自己写的Makefile make的时候报错

error: ‘int64_t’ does not name a type

 

#                                                                             
   2 # Makefile                                                                    
   3 #                                                                             
   4 #                                                                             
   5                                                                               
   6 #define                                                                       
   7 CC=gcc                                                                        
   8 CXX=g++                                                                       
   9 TARGET=TestPthreadDemo                                                        
  10 #CXXFLAGS = -std=c++11                                                        
  11 CXXFLAGS =                                                                    
  12                                                                               
  13 #files                                                                        
  14 objects = TestPthreadDemo.o MultilPthread.o                                   
  15 headers = MultilPthread.h                                                     
  16                                                                               
  17 #rules                                                                        
  18 $(TARGET): $(objects)                                                         
  19         $(CXX)  $(CXXFLAGS) $^ -o $@                                          
  20                                                                               
  21 %.o: %.cpp $(headers)                                                         
  22         $(CXX) -c $(CXXFLAGS) $< -o $@                                        
  23                                                                               
  24 .PHONY : clean                                                                
  25 clean :                                                                       
  26         rm $(objects)                                                         
  27                                                                               
  28 distclean:                                                                    
  29         rm $(TARGET) 

 

需要添加头文件
#include <stdint.h>

参考:https://stackoverflow.com/questions/11069108/uint32-t-does-not-name-a-type

 

posted @ 2019-04-18 14:48  mcdull^0^  阅读(6553)  评论(0编辑  收藏  举报