netgen/ng/gui.cpp
Matthias Hochsteger b2fea6dec1 Clean up multiple definitions of DLL_HEADER
- define DLL_HEADER only once in mydefs.hpp
- define/use NGLIB_API in nglib.h
- use NGCORE_API_EXPORT for explicit export of symbols
2021-02-18 14:53:38 +01:00

34 lines
819 B
C++

#include <mystdlib.h>
#include <inctcl.hpp>
#include <meshing.hpp>
#include <core/ngcore_api.hpp>
namespace netgen
{
NGCORE_API_EXPORT Flags parameters;
}
NGCORE_API_EXPORT bool nodisplay = false;
extern "C" int Ng_Init (Tcl_Interp * interp);
extern "C" int Ng_Vis_Init (Tcl_Interp * interp);
extern "C" void Ng_TclCmd(string);
// tcl package dynamic load
extern "C" int NGCORE_API_EXPORT Gui_Init (Tcl_Interp * interp)
{
if (Ng_Init(interp) == TCL_ERROR) {
cerr << "Problem in Ng_Init: " << endl;
cout << "result = " << Tcl_GetStringResult (interp) << endl;
return TCL_ERROR;
}
if (!nodisplay && Ng_Vis_Init(interp) == TCL_ERROR) {
cerr << "Problem in Ng_Vis_Init: " << endl;
cout << "result = " << Tcl_GetStringResult (interp) << endl;
return TCL_ERROR;
}
return TCL_OK;
}