(SOLVED) Compile error when using OpenCascade 7.3 and netgen

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
apeltauer
Posts: 212
Joined: Fri Aug 11, 2017 2:19 pm

(SOLVED) Compile error when using OpenCascade 7.3 and netgen

Postby apeltauer » Wed Jan 16, 2019 8:40 am

Hi all,

during compiling FreeCAD with OpenCascade 7.3 on Windows I get the following compile error:

\src\3rdParty\salomesmesh\inc\NETGENPlugin_Mesher.hxx(88): fatal error C1017: invalid integer constant expression

this is the source code in NETGENPlugin_Mesher.hxx:
#if NETGEN_VERSION < NETGEN_VERSION_STRING(6,0)

Does anyone know why this happens when compiling with OpenCascade 7.3?? Everything works with OCC 7.1!

Br Manuel
Last edited by apeltauer on Wed Jan 16, 2019 2:17 pm, edited 1 time in total.
wmayer
Site Admin
Posts: 14886
Joined: Thu Feb 19, 2009 10:32 am

Re: Compile error when using OpenCascade 7.3 and netgen

Postby wmayer » Wed Jan 16, 2019 9:35 am

Maybe this is the problem:

Code: Select all

#define NETGEN_VERSION_STRING(a,b) (a << 16) + (b << 8)
Try this

Code: Select all

#define NETGEN_VERSION_STRING(a,b) ((a << 16) + (b << 8))
or this

Code: Select all

#define NETGEN_VERSION_STRING(a,b) ((a << 16) | (b << 8))
User avatar
apeltauer
Posts: 212
Joined: Fri Aug 11, 2017 2:19 pm

Re: Compile error when using OpenCascade 7.3 and netgen

Postby apeltauer » Wed Jan 16, 2019 2:16 pm

Thanks for the help.
After debuging i figured out the the netgen which was found by cmake was from the conda environment.
"NETGEN_VERSION" was set to 6.2-dev, this is why it didnt worked.
After removing the conda stuff from my env varibale the compiling works...

Sorry for the noise and thanks for the help!