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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM