I'm really quite a novice when it comes to the C compilation process, and I've got a question:
I have a series of files that #include
header files using -Idirectory
and all is well. However, I get undefined reference to '<function names>'
when compiling; This is because I haven't linked to any actual code, just the headers, as far as I can tell. However, the same directory that includes the headers (-Idirectory
) also includes the CPP files that have the code. However, I apparently cannot just put them on the path like: gcc file1.cpp file2.cpp directory/*.cpp -Idirectory ....
, so how do I go about doing that? Google only leads me to how to include headers, which I have already done.