Quote Originally Posted by manasij7479 View Post
Oh, the solution is simple..
You need to give the compiler both the .cpp files together. (" g++ foo.cpp main.cpp -o output")
(... or compile them separately with the -c flag and invoke the linker manually. )
actually I tried that by doing: g++ main.cpp foo.o -o output
but it's still the same...