简体   繁体   中英

How do I get the compiler to read a downloaded library?

I've downloaded OpenMesh for Linux Ubuntu. I successfuly compiled it following instructions at

https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-8.0-Documentation/a04067.html

using cmake, then make. The result is a "build" folder containing, among other things, a makefile and.o files. I want to use OpenMesh in QT Creator, so I put an example code found on their website at

https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-8.0-Documentation/a04088.html

basically it just displays a cube using cout and data structures I've downloaded. However, there are compilation errors of type "undefined reference to" everywhere.

Here is an example: "../OpenMesh-8.1/src/OpenMesh/Core/Mesh/ArrayKernel.hh:154: error: undefined reference to `OpenMesh::ArrayKernel::is_valid_handle(OpenMesh::HalfedgeHandle) const'

I think that this could be caused because I didn't tell the compiler somehow where I compiled OpenMesh, because someone else got this error at https://linuxfr.org/forums/programmation-c/posts/openmesh

I don't really get it, though, and I don't know much about the compiling process. I don't know how to import downloaded libraries and run them in QT. Does anyone know a simple way to do this? Any help would be really appreciated.

The correct way to do it is to open CmakeLists.txt in qt creator, which organizes everything correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM