[Gmsh] Add gmsh in existing cmake project
Bruno Correia da Silva
bcs2 at cin.ufpe.br
Thu Jan 3 22:03:36 CET 2013
Hey guys,
I'm newbie in CMake and linux and i'm still have problems to put
gmsh in my project to make a call from source code.
When I add this line in my in my root project path, in file CMakeLists.txt:
"
#GMSH
SET (GMSH_LIB_PATH "/home/padmec/gmsh/lib")
link_directories(${GMSH_LIB_PATH})
link_libraries(Gmsh)
SET (GMSH_INCLUDE_PATH "/home/padmec/gmsh/include/gmsh")
include_directories(${GMSH_INCLUDE_PATH})
"
And when i only add this lines in my cpp file:
"
#include "Gmsh.h"
#include "GModel.h"
#include "MElement.h"
#include "MVertex.h"
#include <iostream>
"
Show me this error.
"
In file included from
/home/padmec/Downloads/Remeshing__project/src/Remover.cpp:11:0:
/home/padmec/gmsh/include/gmsh/MElement.h: At global scope:
/home/padmec/gmsh/include/gmsh/MElement.h:123:11: error: ‘MEdge’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:126:34: error: ‘MEdge’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:126:42: error: ISO C
forbids declaration of ‘edge’ with no type [-fpermissive]
/home/padmec/gmsh/include/gmsh/MElement.h:143:11: error: ‘MFace’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:146:34: error: ‘MFace’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:146:42: error: ISO C
forbids declaration of ‘face’ with no type [-fpermissive]
/home/padmec/gmsh/include/gmsh/MElement.h:364:11: error: ‘MEdge’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:369:10: error: ‘MEdge’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:382:11: error: ‘MFace’ does
not name a type
/home/padmec/gmsh/include/gmsh/MElement.h:387:10: error: ‘MFace’ does
not name a type
make[2]: Leaving directory `/home/padmec/Downloads/Remeshing__project'
"
Let's go to the asking:
First, someone saw this error before?
Second, someplace has a explicit way to add gmsh in a project using CMake?
I saw tutorial folders in gmsh source code, but doesn't help so much.
Best regards
att.
Bruno Correia