DLL_HEADER in onetcl

This commit is contained in:
Matthias Hochsteger 2020-03-02 16:56:46 +00:00
parent d994c589d3
commit 1d652d8206
3 changed files with 5 additions and 3 deletions

View File

@ -206,7 +206,7 @@ int main(int argc, char ** argv)
cout << "using internal Tcl-script" << endl;
// connect to one string
extern const char * ngscript[];
DLL_HEADER const char * ngscript[];
const char ** hcp = ngscript;
int len = 0;
while (*hcp)

View File

@ -1,4 +1,5 @@
const char * ngscript[] = {""
#include <mydefs.hpp>
DLL_HEADER const char * ngscript[] = {""
,"catch {lappend auto_path $env(NETGENDIR) }\n"
,"catch {lappend auto_path $env(NETGENDIR)/../lib }\n"
,"if {[catch {Ng_GetCommandLineParameter batchmode} result ]} {\n"

View File

@ -19,7 +19,8 @@ for f in fnames:
# write a cpp file containing the result of ng.tcl
onetclcpp = open("onetcl.cpp",'w')
onetclcpp.write('const char * ngscript[] = {""'+'\n');
onetclcpp.write('#include <mydefs.hpp>\n');
onetclcpp.write('DLL_HEADER const char * ngscript[] = {""'+'\n');
# make sure to remove comments (and if lines with comments end with '\' also the next line(s) )
skip_next = False # flag to indicate that the next line should be removed