picasso250 / spring12

春节十二响

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gcc 编译出错

zhangxiaoya opened this issue · comments

 spring12 git:(master) gcc twelve_biubiu.c 
twelve_biubiu.c:8:2: error: invalid preprocessing directive #env
 #env "planet_engine"
  ^
twelve_biubiu.c: In function ‘init’:
twelve_biubiu.c:11:5: warning: implicit declaration of function ‘set_engine_number_mask’ [-Wimplicit-function-declaration]
     set_engine_number_mask(ENGINE_ALL);
     ^
twelve_biubiu.c:11:28: error: ‘ENGINE_ALL’ undeclared (first use in this function)
     set_engine_number_mask(ENGINE_ALL);
                            ^
twelve_biubiu.c:11:28: note: each undeclared identifier is reported only once for each function it appears in
twelve_biubiu.c:12:5: warning: implicit declaration of function ‘set_funeral_level’ [-Wimplicit-function-declaration]
     set_funeral_level(FUNERAL_FULL);
     ^
twelve_biubiu.c:12:23: error: ‘FUNERAL_FULL’ undeclared (first use in this function)
     set_funeral_level(FUNERAL_FULL);
                       ^
twelve_biubiu.c:14:9: warning: implicit declaration of function ‘unix_time’ [-Wimplicit-function-declaration]
     if (unix_time() < make_unix_time(2082, 1, 28, 23, 59, 60-10)) return ERR_ENGIN_ENV;
         ^
twelve_biubiu.c:14:23: warning: implicit declaration of function ‘make_unix_time’ [-Wimplicit-function-declaration]
     if (unix_time() < make_unix_time(2082, 1, 28, 23, 59, 60-10)) return ERR_ENGIN_ENV;
                       ^
twelve_biubiu.c:14:74: error: ‘ERR_ENGIN_ENV’ undeclared (first use in this function)
     if (unix_time() < make_unix_time(2082, 1, 28, 23, 59, 60-10)) return ERR_ENGIN_ENV;
                                                                          ^
twelve_biubiu.c:15:12: warning: implicit declaration of function ‘engine_check_init’ [-Wimplicit-function-declaration]
     return engine_check_init(); // after compile and before real run
            ^
twelve_biubiu.c: In function ‘main’:
twelve_biubiu.c:18:5: warning: implicit declaration of function ‘set_curve’ [-Wimplicit-function-declaration]
     set_curve(CURVE_NATURAL); // 自然曲线耗费燃料最少
     ^
twelve_biubiu.c:18:15: error: ‘CURVE_NATURAL’ undeclared (first use in this function)
     set_curve(CURVE_NATURAL); // 自然曲线耗费燃料最少
               ^
twelve_biubiu.c:19:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
     for (int i :range(0, 12, 1)) {
                ^
twelve_biubiu.c:20:9: warning: implicit declaration of function ‘engine_start’ [-Wimplicit-function-declaration]
         engine_start();
         ^
twelve_biubiu.c:21:9: warning: implicit declaration of function ‘wait_engine’ [-Wimplicit-function-declaration]
         wait_engine(ENGINE_STATE_CHAGNE);
         ^
twelve_biubiu.c:21:21: error: ‘ENGINE_STATE_CHAGNE’ undeclared (first use in this function)
         wait_engine(ENGINE_STATE_CHAGNE);
                     ^
twelve_biubiu.c:22:9: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
         sleep(2000);
         ^
twelve_biubiu.c:23:9: warning: implicit declaration of function ‘engin_stop’ [-Wimplicit-function-declaration]
         engin_stop();
         ^
twelve_biubiu.c: In function ‘final’:
twelve_biubiu.c:30:5: warning: implicit declaration of function ‘engine_ensure_shutdown’ [-Wimplicit-function-declaration]
     engine_ensure_shutdown();

hhhhh 认真你就输了

commented

真的无语,没有头文件

我靠,我还以为是新语法😂

commented

亲,都2076年了,这边建议您将gcc升级到9.6.43版本以上呢

此处应有滑稽