-
Notifications
You must be signed in to change notification settings - Fork 50
linux compiling error
This page collects all the common linux compiling error. All these problem is caused by the different compiling criteria of linux gcc and windows cl. gcc has a much stricter compiling criteria, so developer in windows should remember these problems to avoid compiling failure in linux. Developer in linux should recognize these problems easily and fix them.
error: ‘m_position’ was not declared in this scope
m_position.connect(m_integrator->m_position);
when template subclass try to access the properties or methods in its template superclass, you need to add "this->" before the properties or methods like this
this->m_position.connect(m_integrator->m_position);
error: expected primary-expression before ‘>’ token
m_visModule = this->addConstraintModule<ImplicitViscosity<TDataType>>("viscosity");
if you try to use other irrelevent template function in the implementation of template class's methods, you need to add a keyword "template" like this
m_visModule = this->template addConstraintModule<ImplicitViscosity<TDataType>>("viscosity");
error: class ‘Physika::ParticleViscoplasticBody<TDataType>’ does not have any field named ‘ParticleSystem’
: ParticleSystem(name)
If a template subclass extended a template superclass, then you should initialize superclass with template in the subclass' constructor like
template<typename TDataType>
ParticleViscoplasticBody<TDataType>::ParticleViscoplasticBody(std::string name)
: ParticleSystem<TDataType>(name)
First of all, update and upgrade apt-get.
# Add repo and update
$ sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
$ sudo apt-get update
$ sudo apt-get upgrade
Next install needed libraries.
$sudo apt-get install libx11-dev xorg-dev libglu1-mesa-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev