#ifndef test_header_prova_degli_HEADER_h
#define test_header_prova_degli_HEADER_h
externint array[ 3 ];
int funzione_1( int a, int b );
void funzione_2( int c );
#endif
################################################
#include "prova_degli_HEADER.h"
int array[ 3 ] = { 0 , 1 , 2 };
int funzione_1( int a , int b )
{
return ( a + b );
}
void funzione_2( int c )
{
std::cout << " result is: " << c << std::endl;
}
#################################################
#include <iostream>
#include "prova_degli_HEADER.h"
int main()
{
for (int i = 0; i < 3; ++i )
{
funzione_2( funzione_1( i , 2*i ) );
}
return 0;
}
#################################################
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I searched on google but there seems to be a similar problem, or better the reasons that can cause this error are different and can not seem to solve the problem.