How can I link plain c and c++ code together using gcc and g++. I tryed this:
g++ -c test.c #C++ source;
gcc -c main.c test2.c #Plain c source;
g++ main.o test.o test2.o -o main.exe
And this: Compiling C and C++ files together using GCC
But application doesn't see any functions from C-source files.
main.c: undefined reference to `mainWndInit'