Home › Forum › SOFA › Programming with SOFA › Error while use Sofa c++ template in tutorial
Tagged: 64_bits, cpp make error, Linux_ubuntu, SOFA_1706
- This topic has 6 replies, 2 voices, and was last updated 6 years, 8 months ago by
Hugo.
-
AuthorPosts
-
15 March 2019 at 04:17 #13211
Fishuser
BlockedHello every one.
I installed sofa v17.06 on ubuntu 14.04.
I tried to write a scene in C++ template but failed to make it.
Here is my make error. Hope to get some suggestions./home/xutian/sofa-cpp-test/test6/src/Main.cpp: In function ‘int main(int, char**)’:
/home/xutian/sofa-cpp-test/test6/src/Main.cpp:49:5: error: ‘GNode’ is not a member of ‘sofa::simulation::tree’
sofa::simulation::tree::GNode* groot = new sofa::simulation::tree::GNode;19 March 2019 at 19:37 #13229Hugo
KeymasterHi @xutian
You should first use the latest v18.12 release of SOFA instead of 17.06.
Is your C++ code in a separate plugin?
Does your project have the right dependencies to SOFA?
Could you also share your code (especially the around the line 49) ?Hugo
21 March 2019 at 08:52 #13239Fishuser
Blocked@Hugo
Thank you for your reply.
I tried to install latest v18.12 but encountered some question as shown as follow/home/xutian/sofa_18.12/src/SofaKernel/framework/sofa/core/objectmodel/BaseClass.cpp:49:23: error: ‘abi’ has not been declared
char* allocname = abi::__cxa_demangle(t.name(), 0, /*&length*/0, &status);21 March 2019 at 09:01 #13240Fishuser
BlockedAnd I want to know how to paste code on this forum?
Once I paste my code, the submit system will judge my post as spam.21 March 2019 at 21:32 #13243Hugo
KeymasterHi @xutian
I never faced this issue myself, but apparently it’s an issue related to boost: see post here.
Best
Hugo
26 March 2019 at 03:31 #13257Fishuser
BlockedI’ve installed the sofa v18.12 successfully after upgraded the boost version from 1.5.4 to 1.5.8.
But new problem occured when I compiled my code.
/home/xutian/sofa_18.12/install/include/SofasimulationTree/Gnode.h:error:’sofa::simulation::tree::Gnode::Gnode(const string&, sofa::simulation::tree::GNode*)’ is protected GNode( const std::string& name=””,GNode* parent=NULL );26 March 2019 at 09:25 #13259Hugo
KeymasterAnother topic had the same issue as you did (
error: 'abi'), just in case.Regarding your new error, could you give us more of the error log please?
You should be able to see at which line in the code the error comes from.Thanks
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.
