(SOLVED) Compile error when using OpenCascade 7.3 and netgen

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

(SOLVED) Compile error when using OpenCascade 7.3 and netgen

Post by apeltauer »

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
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compile error when using OpenCascade 7.3 and netgen

Post by wmayer »

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: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Compile error when using OpenCascade 7.3 and netgen

Post by apeltauer »

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!
Post Reply