0
I successfully managed to compile bitcoind using the shipped configure script/makefile. Now I want to code something myself and added a folder inside the src directory. The problem now: how do I add my cpp files to the Makefile? When compiling, I get undefined references to functions I implemented inside my cpp files. When looking inside my folder, there are no .o files or anything similar, so I assume they are not compiled. I am completely novice to autoconf/automake and have no idea how to add something to those complicated makefile/configure scripts..
Best wishess to all of you
Thank you very much for your answer, but I am still not able to add my file to Makefile.am. When taking a look at that file, I cannot find any place where a .c/.cpp file is mentioned. I also tried to rerun autoscan/autoconf/automake only getting worse and worse :( – GladHeAteHer – 2017-06-13T13:46:29.463
@GladHeAteHer, bitcoin is a complex project. The root Makefile.am will list subdirectories which contain their own Makefile.am files, which in turn point to other subdirectories with other Makefile.am files. It is in these files where you need to add your new files. As I said in the answer, the specifics are going to be determined by what you are changing and in which order it needs to compile. I highly recommend learning more on autotools before continuing. – Jestin – 2017-06-13T15:50:45.100
Thanks, I found another Makefile.am to which I could add my own .cpp files and it works now :) – GladHeAteHer – 2017-06-16T10:04:28.277