I have the following problem (i'm still very unexperienced when it comes to libraries)
i have this 3 files, in the same folder, the main.cpp, prova.h, prova.cpp
main.cpp
#include "prova.h"
int main(){
myprova(245);
return 0;
}
prova.h
void myprova(int a);
prova.cpp
#include<iostream>
#include"prova.h"
void myprova(int a){
std::cout<<"buongiornissimo"<<a<<endl;
}
when i hit (on atom, with the gpp-compiler from kriscors07) build and run, it just tells me i have an undefined reference on myprova i have also tried leavingt the #include "myprova.h" line in the myprova.cpp file, but it's the same.
compiler error
/tmp/ccS6gADM.o: nella funzione "main":
main.cpp:(.text+0xa): riferimento non definito a "myprova(int)"
collect2: error: ld returned 1 exit status
Halp?