CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Adding new class, how to compile it? (https://www.cfd-online.com/Forums/su2/223700-adding-new-class-how-compile.html)

aman_baig January 22, 2020 14:54

Adding new class, how to compile it?
 
Hi all,


I have added a new class for 1D interpolation in SU2 and I have a new .cpp and .hpp file to include with it. During compilation the compiler does not create the object of my class and gives the following error:



solver_structure.cpp:(.text+0x10d98): undefined reference to `CInletInterpolation::CInletInterpolation(CGeometr y**, CConfig*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short, unsigned short, unsigned short, unsigned short)'



solver_structure.cpp:(.text+0x10e87): undefined reference to `CInletInterpolation::~CInletInterpolation()'



solver_structure.cpp:(.text+0x12426): undefined reference to `CInletInterpolation::~CInletInterpolation()'


Are there are any files I have to change so that the compiler can see the new files?


Thanks,
Aman

akoodlyr January 23, 2020 09:19

Hi,


There should be a meson.build in the src/ directory (for ex, https://github.com/su2code/SU2/blob/...rc/meson.build) where all the .cpp files are listed. Can you try adding your *.cpp file in the corresponding directory (there is a meson.build in all */src directories) and try to compile?


Regards.

pcg January 23, 2020 09:38

Hi Aman,

If this relates to your current pull request let's move the conversation to github.

Cheers,
Pedro

aman_baig January 23, 2020 19:03

Thanks @akoodlyr for your advice. Let me see if that works.

@pcg - Yes this is related to my PR. I will put questions there if it doesn't get resolved.


All times are GMT -4. The time now is 03:20.