[REBOL] DLL questions
From: robert:muench:robertmuench at: 8-Jan-2004 21:59
Hi, is there a trick how I can write some log-messages to the console from
a DLL that I use in a Rebol program? I tried printf and fprintf... but no
output is shown. I start my Rebol program thru from the console:
view.exe script.r
I thought that Rebol might need an already opened cosole in that printf
works. But it doesn't work.
Next problem: How does a Rebol routine! look like for a function "void
func()"? I tried
func: make rountine! [] lib "my_func"
And last but not least I'm having a problem where Rebol crashes at a
specific point. I have C++ code like this:
static Type my_data;
static Type2 root;
extern "C" {
long _export new_stuff(char* name) {
Type my_tmp_data(name, E4_METAKIT);
my_data = my_tmp_data;
if(!my_tmp_data.valid()) {
return false;
}
return true;
}
}
The problem is the assignment. If I comment it, it works. There is a
copy-ctor in the class for Type. In a pure C++ program is works. Could
this be a problem with the char* and memory handling thru Rebol?
I found out that View is very picky about this. The program runs, but View
doesn't terminate in such a case and is left over as zombie process.
--
Robert M. Münch
Management & IT Freelancer
Mobile: +49 (177) 245 2802
http://www.robertmuench.de<