adding source files for compilation
pusrob at vipmail.hu
Thu Nov 24 18:56:32 GMT 2016
I'm rather new to KDevelop, so the question is probably very noobish, but I have to ask anyway:
Right now, I'm using the default shipped template for a small project: Standard --> Terminal --> CMake C++. I also created a header file (my.h) and an additional my.cpp file by right clicking onto the project folder in the projects side pane, and used the create file option. After filling up main.cpp, my.h and my.cpp, with some code, the compiler gives an "undefined reference to" error message to those functions that are declared in my.h and defined in my.cpp.
After browsing around the project folder created by KDevelop, I noticed that none of the cmake files contain any entry about my newly added my.h and my.cpp files, so I suspect my.cpp is never compiled and/or linked. Could somebody tell me how to add these files to the compile list? Is there an automatic way (if I use the create file option from the menu, it would automatically mark the file to be compiled) for this? Maybe I'm just doing something wrong?
Or maybe I'm just too noob and asking too silly questions. If it is so, please correct me, I'd appreciate any useful input.
Thanks in advance!
-=pusrob at vipmail.hu=-
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop