Error: No previous prototype for function. Why am I getting this error?

前端 未结 3 1895
耶瑟儿~
耶瑟儿~ 2020-12-09 02:12

// screen.h

#ifndef screen_h
#define screen_h

#define MAC  1
#define WIN  2
#define LNX  3

#ifdef PLATFORM 
# undef PLATFORM 
#endif

#define PLATFORM MAC
         


        
3条回答
  •  一个人的身影
    2020-12-09 02:20

    I met this similar error minutes ago. After i'd added the relatived function declaration in head file, error's gone.
    Also, some said that canceling the compile option '-Wmissing-prototypes' should work, but i didn't have tried that. Good luck.

提交回复
热议问题