NGSolve C++ addon

Dear NGSolve-community,

we have now a new template for implementing C++ addons:

https://github.com/NGSolve/ngsolve-addon-template

It requires the current NGSolve prerelease (Mar 28) or newer.

Please let us know about any problems and possible improvements - and your own NGSolve addons as well.

Joachim

I am using Windows 10 and trying to compile it with Visual Studio 2022.
I got the following message when compiling with my_ngsolve_addon.cpp.

C:\Program Files\Python310\Lib\site-packages\netgen\libngsolve.dll : fatal error LNK1107: File is invalid or broken.  can not read 0x340,

I am using Python 3.10.5.
netgen-mesher==6.2.2402
ngsolve==6.2.2402

Kengo

Did you apply custom cmake flags? Seems like the build tools want to use libngsolve.dll instead of libngsolve.lib for linking.

Anyway, you need to use the latest NGSolve PRE-Release as stated above.
First update by running
pip install --upgrade --pre ngsolve
then try again.

Best,
Matthias

1 Like