Hi! I´m trying to compile an SDL project -created using the CodeBlock´s template for SDL projects- which includes a few source files. After a successful compilation I get linker errors about "undefined references" from my own´s source files. As a simple test I tried the following piece of code, but the error is still there (I get an undefined reference to Vector2DFPDotProd).
#include "MathLibFP.h"
int
main(int argc,char** argv)
{
Vector2DFPType VecA = {1.0f,1.0f}, VecB = {1.0f,1.0f};
Vector2DFPDotProd(&VecA,&VecB);
return 0;
}
I tried cleaning the project and rebuilding, but nothing. Here´s a piece of the project´s makefile:
.deps/MathLibFP.d: MathLibFP.c
@echo Calculating dependencies for "MathLibFP.c"...
@$(default_CC) -MM $(default_CFLAGS) -MF .deps/MathLibFP.d -MT .objs/MathLibFP.o $(default_INCS) MathLibFP.c
.objs/MathLibFP.o: .deps/MathLibFP.d
@echo Compiling "MathLibFP.c"...
@$(default_CC) $(default_CFLAGS) $(default_INCS) -c MathLibFP.c -o .objs/MathLibFP.o
which shows that MathLibFP.c is being compiled. Any suggestions on how to solve this??
Thanks in advance!
--Nacho