<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hi Bruno,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> check two things: </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> 1) iofwd.h, line 25: make sure that whatever you put there has this form:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-weight:600;"> </span>#include "my_file.h" // The # at the beginning is important.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> and not</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> include "my_file.h" or include<my_file.h></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> Use < > for STL headers.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> 2) if iofwd is a header created by you, make sure you used include guards. The first two lines and the last line of your file should say something like</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> #ifndef IOFWD_H // first line</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> #define IOFWD_H // second line</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> ... your code ....</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> #endif // last line of the file.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> Best regards,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> Martin Vymazal</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Thursday 17 January 2013 16:53:47 Bruno Correia da Silva wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hey Martin,<br /><br /> Thanks for your support.<br /> I did what you explained about add "MEdge.h" and "MFace.h". After this, i change again my CMAKELIST.txt.<br /> I'm using UNIX makefile compiler and default native compilers.<br /> For better explained: I'm using the FMDB library.<br /><br />My CMAKELIST now is:<br />"<br /><span style=" font-weight:600;">set (APPLICATIONS /home/padmec/applications)<br /> ## FMDB<br />set (FMDB_INCLUDE "${APPLICATIONS}/FMDB-2011/include" CACHE PATH "Directory where FMDB header files can be found")<br />set (FMDB_LIB "${APPLICATIONS}/FMDB-2011/lib" CACHE PATH "Directory where the FMDB library can be found")<br />include_directories(${FMDB_INCLUDE})<br />link_directories(${FMDB_LIB})<br />link_libraries(FMDB-O)<br /><br />#GMSH<br />SET( GMSH_SRC "/home/padmec/Desktop/gmsh/gmsh" CACHE STRING "GMSH SRC" )<br />SET( GMSH_INC<br /> "${GMSH_SRC}/Common"<br /> "${GMSH_SRC}/Geo"<br /> "${GMSH_SRC}/Plugin"<br /> "${GMSH_SRC}/Solver"<br /> "${GMSH_SRC}/Numeric"<br /> "${GMSH_SRC}/build/Common" )<br />INCLUDE_DIRECTORIES( ${GMSH_INC} )<br /><br />SET( GMSH_LIB "${GMSH_SRC}/lib" )<br /><br />add_executable(Remeshing__Proj ${SRCS} ${HDRS})<br />TARGET_LINK_LIBRARIES(Remeshing__Proj Gmsh )<br /></span>"<br />And show me this errors:<br />"<span style=" font-weight:600;"><br />/home/padmec/applications/FMDB-2011/include/iofwd.h: At global scope:<br />/home/padmec/applications/FMDB-2011/include/iofwd.h:25:1: error: ‘include’ does not name a type<br />In file included from /home/padmec/Desktop/gmsh/gmsh/Numeric/Numeric.h:12:0,<br /> from /home/padmec/Desktop/gmsh/gmsh/Geo/GFace.h:19,<br /> from /home/padmec/Desktop/gmsh/gmsh/Geo/GModel.h:16,<br /> from /home/padmec/Downloads/Remeshing__project/src/Remover.cpp:10:<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h: In function ‘SPoint3 operator+(const SPoint3&, const SPoint3&)’:<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:85:16: error: redefinition of ‘SPoint3 operator+(const SPoint3&, const SPoint3&)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:49:16: error: ‘SPoint3 operator+(const SPoint3&, const SPoint3&)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h: In function ‘SPoint3 operator-(const SPoint3&, const SPoint3&)’:<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:88:16: error: redefinition of ‘SPoint3 operator-(const SPoint3&, const SPoint3&)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:52:16: error: ‘SPoint3 operator-(const SPoint3&, const SPoint3&)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h: At global scope:<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:91:13: error: redefinition of ‘void SPoint3::setPosition(double, double, double)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:55:13: error: ‘void SPoint3::setPosition(double, double, double)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:94:13: error: redefinition of ‘void SPoint3::getPosition(double*, double*, double*) const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:58:13: error: ‘void SPoint3::getPosition(double*, double*, double*) const’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:97:13: error: redefinition of ‘void SPoint3::position(double*) const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:61:13: error: ‘void SPoint3::position(double*) const’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:100:15: error: redefinition of ‘double SPoint3::x() const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:64:15: error: ‘double SPoint3::x() const’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:103:15: error: redefinition of ‘double SPoint3::y() const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:67:15: error: ‘double SPoint3::y() const’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:106:15: error: redefinition of ‘double SPoint3::z() const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:70:15: error: ‘double SPoint3::z() const’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:109:18: error: redefinition of ‘SPoint3& SPoint3::operator=(const SPoint3&)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:73:18: error: ‘SPoint3& SPoint3::operator=(const SPoint3&)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:112:13: error: redefinition of ‘void SPoint3::operator+=(const SPoint3&)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:76:13: error: ‘void SPoint3::operator+=(const SPoint3&)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:115:13: error: redefinition of ‘void SPoint3::operator-=(const SPoint3&)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:79:13: error: ‘void SPoint3::operator-=(const SPoint3&)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:118:13: error: redefinition of ‘void SPoint3::operator*=(double)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:82:13: error: ‘void SPoint3::operator*=(double)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:121:16: error: redefinition of ‘SPoint3 SPoint3::operator*(double)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:88:16: error: ‘SPoint3 SPoint3::operator*(double)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:124:16: error: redefinition of ‘double& SPoint3::operator[](int)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SPoint3.h:91:16: error: ‘double& SPoint3::operator[](int)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SPoint3.h:127:15: error: redefinition of ‘double SPoint3::operator[](int) const’<br />....<br />In file included from /home/padmec/Desktop/gmsh/gmsh/Numeric/Numeric.h:13:0,<br /> from /home/padmec/Desktop/gmsh/gmsh/Geo/GFace.h:19,<br /> from /home/padmec/Desktop/gmsh/gmsh/Geo/GModel.h:16,<br /> from /home/padmec/Downloads/Remeshing__project/src/Remover.cpp:10:<br />/home/padmec/applications/FMDB-2011/include/SVector3.h:27:7: error: redefinition of ‘class SVector3’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SVector3.h:15:7: error: previous definition of ‘class SVector3’<br />/home/padmec/applications/FMDB-2011/include/SVector3.h:96:16: error: redefinition of ‘double& SVector3::operator[](int)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SVector3.h:40:11: error: ‘double& SVector3::operator[](int)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SVector3.h:99:15: error: redefinition of ‘double SVector3::operator[](int) const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SVector3.h:41:10: error: ‘double SVector3::operator[](int) const’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SVector3.h:102:16: error: redefinition of ‘double& SVector3::operator()(int)’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SVector3.h:42:11: error: ‘double& SVector3::operator()(int)’ previously defined here<br />/home/padmec/applications/FMDB-2011/include/SVector3.h:105:15: error: redefinition of ‘double SVector3::operator()(int) const’<br />/home/padmec/Desktop/gmsh/gmsh/Geo/SVector3.h:43:10: error: ‘double SVector3::operator()(int) const’ previously defined here</span><br />"<br />Anyone used FMDB and GMSH in a same project? Anyone saw similar errors?<br /><br />Thanks,<br />Best Regards<br />Bruno Correia<br /><br />--------------------<br /></p>
<pre style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Hi Bruno,</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier';"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> try to add </span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier';"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> #include "MEdge.h"</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> #include "MFace.h"</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier';"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> at the beginning of your code to remove the errors you see. I'm not a cmake </span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">expert either, but I think that the recommended practice is to use </span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">target_link_libraries(TARGET_NAME lib1 lib2 ...) and not link_directories. </span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier';"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Best regards,</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier';"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> Martin Vymazal </span></pre>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">2013/1/3 Bruno Correia da Silva <<a href="mailto:bcs2@cin.ufpe.br"><span style=" text-decoration: underline; color:#0057ae;">bcs2@cin.ufpe.br</span></a>><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:44px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Sorry,<br /><br /> I'm using ubuntu 12.04.<br /><br />att.<br />Bruno Correia<br /><br />2013/1/3 Bruno Correia da Silva <<a href="mailto:bcs2@cin.ufpe.br"><span style=" text-decoration: underline; color:#0057ae;">bcs2@cin.ufpe.br</span></a>>:<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:44px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Hey guys,<br />><br />> I'm newbie in CMake and linux and i'm still have problems to put<br />> gmsh in my project to make a call from source code.<br />><br />> When I add this line in my in my root project path, in file CMakeLists.txt:<br />> "<br />> #GMSH<br />> SET (GMSH_LIB_PATH "/home/padmec/gmsh/lib")<br />> link_directories(${GMSH_LIB_PATH})<br />> link_libraries(Gmsh)<br />> SET (GMSH_INCLUDE_PATH "/home/padmec/gmsh/include/gmsh")<br />> include_directories(${GMSH_INCLUDE_PATH})<br />> "<br />><br />> And when i only add this lines in my cpp file:<br />> "<br />> #include "Gmsh.h"<br />> #include "GModel.h"<br />> #include "MElement.h"<br />> #include "MVertex.h"<br />> #include <iostream><br />><br />> "<br />> Show me this error.<br />> "<br />><br />> In file included from<br />> /home/padmec/Downloads/Remeshing__project/src/Remover.cpp:11:0:<br />> /home/padmec/gmsh/include/gmsh/MElement.h: At global scope:<br />> /home/padmec/gmsh/include/gmsh/MElement.h:123:11: error: ‘MEdge’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:126:34: error: ‘MEdge’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:126:42: error: ISO C<br />> forbids declaration of ‘edge’ with no type [-fpermissive]<br />> /home/padmec/gmsh/include/gmsh/MElement.h:143:11: error: ‘MFace’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:146:34: error: ‘MFace’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:146:42: error: ISO C<br />> forbids declaration of ‘face’ with no type [-fpermissive]<br />> /home/padmec/gmsh/include/gmsh/MElement.h:364:11: error: ‘MEdge’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:369:10: error: ‘MEdge’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:382:11: error: ‘MFace’ does<br />> not name a type<br />> /home/padmec/gmsh/include/gmsh/MElement.h:387:10: error: ‘MFace’ does<br />> not name a type<br />> make[2]: Leaving directory `/home/padmec/Downloads/Remeshing__project'<br />><br />> "<br />> Let's go to the asking:<br />> First, someone saw this error before?<br />> Second, someplace has a explicit way to add gmsh in a project using CMake?<br />> I saw tutorial folders in gmsh source code, but doesn't help so much.<br />><br />> Best regards<br />> att.<br />> Bruno Correia<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p></body></html>