I’m trying to build cgx 2.19 from source on Mac OS.
I’ve tried following the Mac instructions from 2015 (noting that they apply to a different version of macOS). When I run sudo make in the /usr/local/CalculiX/cgx_2.19/src folder I get the following error:
parser.c:91:3: error: implicit declaration of function 'DrawCommandLine' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
DrawCommandLine(keystroke, strlen(keystroke) + *curshft);
It seems like the function definition for DrawCommandLine is not getting included. I’m not very familiar with C/C++ but it seems that this function is included in cgx.c which itself is included by MakeFile.inc
It seems the compilation runs without errors, but ends with a lot of warnings like this:
ld: warning: object file (/var/tmp//ccrWCwNi.o) was built for newer macOS version (12.0) than being linked (10.17.4)
ld: warning: object file (/var/tmp//cck4ppOP.o) was built for newer macOS version (12.0) than being linked (10.17.4)
ld: warning: object file (/var/tmp//cc8xH23e.o) was built for newer macOS version (12.0) than being linked (10.17.4)
on my Mac, after I open a .frd results file, I have to manually resize the cgx application window, for the model to show up. I first change its size to a small window then resize it to a normal one and the model shows up.
I’m trying to build cgx 2_20 with Ventura on a M1 Ultra. I downloaded the latest binary, and after getting make errors, found this thread and in particular the suggestions by mparente for modifying parser.c, picfunctions.c, and the Makefile.
However, in addition to multiple warnings, I get 2 errors:
pickFunktions.c:4597:3: error: non-void function ‘normalLine’ should return a value [-Wreturn-type]
pickFunktions.c:8375:5: error: call to undeclared function ‘mergeElem’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Has anyone with a similar setup (Ventura, cgx 2_20) been able to get cgx to work? Any suggestions for how I could get this to work?
Thanks, in advanced