CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Adding new class, how to compile it?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pcg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2020, 14:54
Default Adding new class, how to compile it?
  #1
New Member
 
Aman uz zaman Baig
Join Date: Nov 2015
Location: Cincinnati, US
Posts: 16
Rep Power: 10
aman_baig is on a distinguished road
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
aman_baig is offline   Reply With Quote

Old   January 23, 2020, 09:19
Default
  #2
Member
 
Akshay Koodly
Join Date: Aug 2017
Location: The Netherlands
Posts: 43
Rep Power: 8
akoodlyr is on a distinguished road
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.
akoodlyr is offline   Reply With Quote

Old   January 23, 2020, 09:38
Default
  #3
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 465
Rep Power: 13
pcg is on a distinguished road
Hi Aman,

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

Cheers,
Pedro
aman_baig likes this.
pcg is offline   Reply With Quote

Old   January 23, 2020, 19:03
Default
  #4
New Member
 
Aman uz zaman Baig
Join Date: Nov 2015
Location: Cincinnati, US
Posts: 16
Rep Power: 10
aman_baig is on a distinguished road
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.
aman_baig is offline   Reply With Quote

Reply

Tags
class, compile, su2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
chtMultiRegionSimpleFoam 3D problem Lucie OpenFOAM Pre-Processing 2 June 21, 2016 05:23
adding new fvm class danny123 OpenFOAM Programming & Development 1 December 14, 2015 09:53
chtMultiRegionFoam, adding a member to an existing class (regionProperties) romain.h OpenFOAM Running, Solving & CFD 1 October 10, 2012 15:05
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 21:51
Adding new class in version 12 billy OpenFOAM Pre-Processing 1 October 10, 2005 04:47


All times are GMT -4. The time now is 00:15.