Thread overview | |||||
---|---|---|---|---|---|
|
June 26, 2015 using new in shared library causes access violation | ||||
---|---|---|---|---|
| ||||
hi, I have a c++ program with a plugin system and i try to write a plugin for it. when the plugin is loaded by the program the extern (C) int OnInit() method is called. so far everything works fine. But as soon as i try to create a new class instance a segmentation fault occurs ( the constructor is empty ). Here is a screenshot with all the important code # error message in the left console # right top the executed code # right bottom the dub.json i use http://imgur.com/PfvsAm4 hopefully any1 can make sense of this error :/ thank you for helping |
June 26, 2015 Re: using new in shared library causes access violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to dd0s | Did you call Runtime.initialized in the D side of that initialization fucntion? |
June 26, 2015 Re: using new in shared library causes access violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Friday, 26 June 2015 at 16:32:44 UTC, Adam D. Ruppe wrote: > Did you call Runtime.initialized in the D side of that initialization fucntion? No i wasn't aware of that. Thank you so much Adam. I still don't know what it does exactly but i just call it when OnPluginInit() is called. Are you aware of any resources where i can read up on this? btw bought your D Cookbook, and like it alot :3 if any1 is looking for it http://dlang.org/phobos/core_runtime.html import core.runtime; then call Runtime.initialize(); |
Copyright © 1999-2021 by the D Language Foundation