Poll
Question:
Is it possible to remove it?
Option 1: Yes
votes: 0
Option 2: No
votes: 0
Option 3: Yes
votes: 0
Option 4: No
votes: 0
Hi,
I have one big problem with C::B. I just don`t know how to link header, i wrote something like this:
//main.cpp
#include "foo.h"
int main(){
bar A;
A.show();
}
//foo.h
class bar{
public:
int qwerty;
int show();
};
//foo.cpp
#include "foo.h"
int bar::show(){
return qwerty;
}
And when I try to compile,build and run this i got error "undefined reference to show()", what exactly means that something went wrong with linkink these files. I have no idea how to show linker what to link. (before i was using Kdevelop, and there was no issue with linker)
Sorry for that pool above, my mistake.
If you have not yet created a project, do it now (wizard empty project).
Add both cpp-files and the header file, and that's it.
Ok, now i got it. I didn`t mark option in wizard "in build targets". Now i marked both options (debug, release) and it works :)