[SOLVED] Compiling library by gcc and g++
General and Desktop
2
Posts
1
Posters
777
Views
1
Watching
-
wrote on 17 Apr 2014, 14:29 last edited by
Hello. I created simple qt5 project containing main.c only and using library lib.a. It compiles by gcc successfully. But if i will rename file to main.cpp and will try to compile it by g++, I will get linker "undefined reference" error. No library source code provided. Is there any way to compile projects by g++? Thanks
-
wrote on 18 Apr 2014, 07:04 last edited by
Adding "extern "C"" before function's declarations in header solves the problem
1/2