Hello. When I'm trying to create a class object by using a
dlsym-ed function, I'm getting a segmentation fault after
execution of program.
However, if I'm deleting that object before 'return 0' in main
(by using 'delete b'), everything is going fine.
I'm just started to learn D after using C
On 2012-07-18 06:51, Konstantin J. Chernov wrote:
Hello. When I'm trying to create a class object by using a dlsym-ed
function, I'm getting a segmentation fault after execution of program.
However, if I'm deleting that object before 'return 0' in main (by using
'delete b'), everything is going f
What am I doing wrong here? Is there any way to do what I'm
trying to do
right way?
Dynamic libraries aren't properly supported by the runtime.
That's terrible:(
It's so nice to make an interface, and create classes that
inherit this interface dynamically, without linking...
Maybe there's
Konstantin J. Chernov:
testclass.di:
class testclass
{
this(const wstring loadmsg);
~this();
wstring foo();
};
And usually you don't need to write .di files in D.
Bye,
bearophile
On 2012-07-18 10:17, Konstantin J. Chernov wrote:
What am I doing wrong here? Is there any way to do what I'm trying to do
right way?
Dynamic libraries aren't properly supported by the runtime.
That's terrible:(
It's so nice to make an interface, and create classes that inherit this
interfac
On 18-07-2012 06:51, Konstantin J. Chernov wrote:
Hello. When I'm trying to create a class object by using a dlsym-ed
function, I'm getting a segmentation fault after execution of program.
However, if I'm deleting that object before 'return 0' in main (by using
'delete b'), everything is going f
Thank you for your replies!
I've found a working solution - all I needed is to change wstring
to const wstring, and pass it not as func("something"), but as
wstring tmp = "something"; func(tmp);
That's really odd, because I don't understand, how those changes
made segfault disappear.
Her
Probably you mean the same problem that is described in the thread
avobe, see "using GC needs particular skills?"
Every time after execution my code I got very frustating access
violation and the problem was misunderstanding garbage collector because
I've never used it before.