Linker error from a distant planet


Basically, I have this header:

1
2
3
4
5
6
7
8
9
10
11
12
13

#include "ast.h"

static ASTExpression *parse_numeric_expression(void);
static ASTExpression *parse_parenthesis_expression(void);
static ASTExpression *parse_identifier_expression(void);
static ASTExpression *parse_primary(void);
static ASTExpression *parse_expression(void);
static ASTExpression *parse_binop_rhs(int expression_precedence, ASTExpression *LHS);
static ASTPrototype *parse_prototype(void);
static ASTFunction *parse_definition(void);
static ASTPrototype *parse_extern(void);
static ASTFunction *parse_toplevel_expression(void);


and an implementation file in which all these are implemented. However, at link-time, I'm getting (among others) this gem of an error:

parser.h:11:21: warning: ‘ASTFunction* parse_definition()’ used but never defined [enabled by default]
parser.h:12:22: warning: ‘ASTPrototype* parse_extern()’ used but never defined [enabled by default]
parser.h:13:21: warning: ‘ASTFunction* parse_toplevel_expression()’ used but never defined [enabled by default]


So, for some reason g++ finds all implementations except for the three last functions. I know the functions are properly implemented, because they worked fine until I decided to split my code up into separate files (which has been giving me a headache for the past couple of hours). Of course I'll provide the .cpp file if necessary. Does this make sense to anyone?

EDIT: Pardon the nondescript title, I have no idea what to call this
Last edited on
Now it works. No idea what I did. I'm sorry. Good night.
It is not an error but a warning. It tells that you never called that function.
Topic archived. No new replies allowed.