I have a bunch of C++ files that reference functions defined in a sub-directory inside src/. Is there a way to specify the cpp files inside the sub-directory via g++?
Here is the structure of the package:
# SeqLib
# |----src
# |-----|---Makevars
# |-----|---rcpp_hello_world.cpp
# |-----|---SeqLib(a submodule)
# |-----|------|---SeqLib
# |-----|------|---FermiAssembler.h
# |-----|------|---src
# |-----|------|---|----FermiAssembler.cpp
************************* EDIT **************
When running -I../src/SeqLib/, I get an error undefined symbol: _ZN6SeqLib14FermiAssemblerD1Ev. Using c++filt, the symbol references the destructor declared in FermiAssembler.h but, defined in FermiAssembler.cpp
-Ioption. For the code, you have the linker...-Icould I just reference FermiAssembler in rcpp_hello_world.cpp via #include "SeqLib/FermiAssembler.h" or "SeqLib/FermiAssembler.cpp".cppfiles! and with your structure you don't need option if you pass the correct relative path in the include directive.