Compiler says parameter list is wrong, then in next sentence says function is an unresolved external symbol? How is this possible? How to fix?

0

I'm confused by this. The compiler is complaining about an unresolved external symbol... but if I add a parameter to it, it still knows to complain about the added parameter.

enter image description here

The function definition with the types and macros, in util.h (which is already included by the header I'm including and I've tried including myself):

typedef u32 ticks_t;

#define TICK_DIFF(a,b) ((signed int)(((a)<<1)-((b)<<1))>>1)
#define TICK_GT(a,b) (TICK_DIFF(a,b) > 0)
#define TICK_MAKE(a) ((a) & 0x7fffffff)

ticks_t current_ticks(void);

So current_ticks() does not work, but the macros and types from the same header do work:

ticks_t now = TICK_MAKE(current_ticks());//does not complain about ticks_t or TICK_MAKE, 
//but does complain about current_ticks??
TICK_DIFF(now,p->lastdeath);//no complaining at all??

Any ideas what is happening here?

c
function
compiler-errors
header
include
asked on Stack Overflow Jul 11, 2020 by Plaje

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0