- This topic has 6 replies, 2 voices, and was last updated 5 years, 9 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › Error while use Sofa c++ template in tutorial
Tagged: 64_bits, cpp make error, Linux_ubuntu, SOFA_1706
Hello 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;
Hi @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
@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);
And 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.
Hi @xutian
I never faced this issue myself, but apparently it’s an issue related to boost: see post here.
Best
Hugo
I’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 );
Another 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
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.