I want to split a program developed in c using z88dk in several .c files and I do not know how.
I have these files:
- test.c: The main file with the "main" method.
- test2.c: An auxiliar file with the "AuxFunction" method.
- test3.h: The header definition for test2.c
I Build with this command: D:\Spectrum\z88dk\bin\zcc.exe +zx -lndos -create-app test.c test2.c -o test
The error reported from zcc is this: Error at module 'test2': symbol '_AuxFunction' already defined in module 'test2'
There are the sources:
test.c
/* test.c file */
#include <stdio.h>
#include "test2.h"
void main(){
printf("Include test 1.1!\n");
printf(AuxFunction("Hello"));
}
test2.c
/* Test2.c file */
char* AuxFunction(char* txt){
return txt;
}
test2.h
/* test2.h file */
char* AuxFunction(char*);
Any link, help or suggestion will be welcome!
Thanks for your time!