2
I am making a simple program but using header file . h (header) and a hello world function, but I have the following warning message: Undefined Reference to 'imprime'. I asked someone else to test it and said it worked out which might still be?
Follows code:
=== Arquivo MainCodeCount.c ==
#include <stdio.h>
#include <stdlib.h>
#include "LibCodeCount.h"
int main(int argc, char *argv[])
{
imprime();
return 0;
}
=== Arquivo CodeCount.c ===
#include <stdio.h>
#include "LibCodeCount.h"
void imprime()
{
printf("Ola mundo!\n");
}
=== Arquivo CodeCount.h (header) ==
void imprime();
Thank you, gentlemen, but I decided as follows: I just configured gcc in the windows path and the commands: gcc -c Maincodecount. c gcc -c Libcodecount. c ; gcc -o HELLO Maincodecount. o Libcodecount. o .
– phpricardo
If you solved your problem that way, better put as a reply instead of a comment. So it’s easier to know what Voc6e did to solve your problem.
– Gabe