Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

questions about cmake #1

Open
Guo-Shuai opened this issue Jun 1, 2018 · 6 comments
Open

questions about cmake #1

Guo-Shuai opened this issue Jun 1, 2018 · 6 comments

Comments

@Guo-Shuai
Copy link

I have build bulllet physics according to the guide on the website of Bullet. But how to set the Bullet_inlcude_dir when cmake Ane_stent. I have tried some path. But none of them works.
The error :
Could NOT find Bullet (missing: BULLET_MATH_LIBRARY)
CMake Error at CMakeLists.txt:16 (message):
message called with incorrect number of arguments

Could you please help me out?

@jquinterog
Copy link
Collaborator

jquinterog commented Jun 1, 2018

If you did "sudo make install" the include dir should be /usr/local/include/bullet
The field BULLET_MATH_LIBRARY must have the location of the libLinearMath.a or libLinearMath.so. In my case, it is /usr/local/lib/libLinearMath.a
captura de pantalla 2018-06-01 a la s 9 13 26 a m

@davl3232
Copy link
Owner

davl3232 commented Jun 1, 2018

If you did "sudo make install" the include dir should be /usr/local/include/bullet
The field BULLET_MATH_LIBRARY must have the location of the libLinearMath.a or libLinearMath.so. In my case, it is /usr/local/lib/libLinearMath.a

Take into account that for this to work, after you have Bullet Physics compiled, you need to run sudo make install inside Bullet's build directory first.

You can also find the .so/.a files inside Bullet's build directory, and pass each one of them to CMake, just like @jquinterog shows (except with the path inside said build directory, since the /usr/local/lib... path works when Bullet is installed), in case you don't want to install Bullet Physics.

The OS you run matters a bit for the CMake to work. So far this project has been tested on Ubuntu Linux 16 and MacOS High Sierra.

For the project to work you need VTK installed. We have tested version 8.1. You can find it here.

Some versions of Bullet Physics might not work, we tested with version 2.86 which you can download here.

Sorry for not including proper documentation yet, so far we have it in Spanish in our university website, since this is our graduation project.

@Guo-Shuai
Copy link
Author

Oh, I build bullet in win10, and I tried to build the project in win10. And maybe there are some differences. I do not have that path. I will try to build in ubuntu. Thank you very much for your answer.

@Guo-Shuai
Copy link
Author

hello, I tried to build it on ubuntu16.04
I build vtk8.1 and bullet3-2.86, but I got an error when make the ane-stent.

/usr/local/include/vtk-8.1/vtkSmartPointer.h: In instantiation of ‘static vtkSmartPointer vtkSmartPointer::New() [with T = vtkTransform]’:
/home/med429/ane-stent/Ane-stent-master/src/scene/SceneSoftObject.h:28:56: required from here
/usr/local/include/vtk-8.1/vtkSmartPointer.h:155:37: error: incomplete type ‘vtkTransform’ used in nested name specifier
return vtkSmartPointer(T::New(), NoReference());
^
CMakeFiles/main.dir/build.make:158: recipe for target 'CMakeFiles/main.dir/src/scene/InflatingObject.cpp.o' failed
make[2]: *** [CMakeFiles/main.dir/src/scene/InflatingObject.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[1]: *** [CMakeFiles/main.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

I do not know how to fix this, could you please help me out?

@jquinterog
Copy link
Collaborator

It worked compiling on OSX, on linux, you must include another library. We have just made a commit with that, so pull the repository and try again.
to execute, you will find in the root directory the file "input.txt". You must execute with that file as a parameter.

@Guo-Shuai
Copy link
Author

I updated the repository and try again, but there is another error in the make progress.

CMakeFiles/main.dir/src/main.cpp.o: In function main':
main.cpp:(.text+0x1eb9): undefined reference to btSoftBody::setTotalMass(float, bool)' CMakeFiles/main.dir/src/loaders/ModelLoader.cpp.o: In function createConvexHullCollider(vtkSmartPointer, vtkSmartPointer)':
ModelLoader.cpp:(.text+0x359): undefined reference to btConvexHullShape::btConvexHullShape(float const*, int, int)' CMakeFiles/main.dir/src/scene/SceneSoftObject.cpp.o: In function SceneSoftObject::InitSoftBody(btSoftBodyWorldInfo&, vtkSmartPointer)':
SceneSoftObject.cpp:(.text+0x85c): undefined reference to btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo&, float const*, int const*, int, bool)' collect2: error: ld returned 1 exit status CMakeFiles/main.dir/build.make:400: recipe for target 'main' failed make[2]: *** [main] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed make[1]: *** [CMakeFiles/main.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Do you know how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants