fix ngsolve loading

This commit is contained in:
Matthias Hochsteger 2022-05-07 15:13:00 +02:00
parent 1a174508db
commit 81f5ed5415
2 changed files with 14 additions and 4 deletions

View File

@ -15,7 +15,7 @@ target_sources(nglib PRIVATE onetcl.cpp)
if(USE_GUI)
target_sources(nggui PRIVATE
gui.cpp ngpkg.cpp demoview.cpp parallelfunc.cpp
gui.cpp ngpkg.cpp demoview.cpp parallelfunc.cpp ngtcl.cpp
)
if(NOT BUILD_FOR_CONDA)

View File

@ -1,9 +1,19 @@
#include <inctcl.hpp>
#include "../libsrc/meshing/visual_interface.hpp"
#include <inctcl.hpp>
static void Impl_Ng_Tcl_SetResult(Tcl_Interp *interp, char *result, const int freeProc)
{
Tcl_SetResult(interp, result, (Tcl_FreeProc*)freeProc);
}
static void Impl_Ng_Tcl_CreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc)
{
Tcl_CreateCommand(interp, cmdName, proc, nullptr, nullptr);
}
static bool dummy_init_pointers = [](){
Ptr_Ng_Tcl_SetResult = Tcl_SetResult;
Ptr_Ng_Tcl_CreateCommand = Tcl_CreateCommand;
netgen::Ptr_Ng_Tcl_SetResult = Impl_Ng_Tcl_SetResult;
netgen::Ptr_Ng_Tcl_CreateCommand = Impl_Ng_Tcl_CreateCommand;
return true;
}();