Re: Using .lib and .dll in D applications

2016-06-22 Thread moe via Digitalmars-d-learn
On Wednesday, 22 June 2016 at 05:34:33 UTC, Mike Parker wrote: On Wednesday, 22 June 2016 at 03:06:29 UTC, moe wrote: I meant like this: - PluginContract // not a dub project, just some folder -- iplugin.d - TestApp // all files for the app (separate project) -- packages

Re: Using .lib and .dll in D applications

2016-06-21 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 22 June 2016 at 03:06:29 UTC, moe wrote: I meant like this: - PluginContract // not a dub project, just some folder -- iplugin.d - TestApp // all files for the app (separate project) -- packages DerelictUtil-master // contains the project for derelict -- source app.d

Re: Using .lib and .dll in D applications

2016-06-21 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 22 June 2016 at 02:38:23 UTC, moe wrote: Yes, I did it intentionally. I wanted to ensure that the packages are self contained and check whether it would work fine like this. Basically I like to have a project that contains everything it needs with the versions originally used

Re: Using .lib and .dll in D applications

2016-06-21 Thread moe via Digitalmars-d-learn
On Wednesday, 22 June 2016 at 01:40:47 UTC, Mike Parker wrote: On Tuesday, 21 June 2016 at 23:59:54 UTC, moe wrote: I had some time to try it out and I finally got it to work. I have only tried in windows so far but there was a pitfall in windows. Your dll need a DllMain entry to compile. This

Re: Using .lib and .dll in D applications

2016-06-21 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 21 June 2016 at 23:59:54 UTC, moe wrote: I had some time to try it out and I finally got it to work. I have only tried in windows so far but there was a pitfall in windows. Your dll need a DllMain entry to compile. This was the only thing that was missing from your information.

Re: Using .lib and .dll in D applications

2016-06-21 Thread moe via Digitalmars-d-learn
I had some time to try it out and I finally got it to work. I have only tried in windows so far but there was a pitfall in windows. Your dll need a DllMain entry to compile. This was the only thing that was missing from your information. The rest worked perfectly. This may be obvious to most

Re: Using .lib and .dll in D applications

2016-06-20 Thread moe via Digitalmars-d-learn
On Monday, 20 June 2016 at 13:51:15 UTC, Mike Parker wrote: interface Plugin { bool initialize(); void terminate(); Throwable getLastException(); SomeObject getSomeObject(); void returnSomeObject(SomeObject); } Sorry, I forgot a couple of commments. I did explain it in the

Re: Using .lib and .dll in D applications

2016-06-20 Thread Mike Parker via Digitalmars-d-learn
interface Plugin { bool initialize(); void terminate(); Throwable getLastException(); SomeObject getSomeObject(); void returnSomeObject(SomeObject); } Sorry, I forgot a couple of commments. I did explain it in the text, though. It was supposed to read: interface Plugin {

Re: Using .lib and .dll in D applications

2016-06-20 Thread Mike Parker via Digitalmars-d-learn
On Monday, 20 June 2016 at 11:25:04 UTC, moe wrote: Where I still have a problem is with a plugin system. I would like to write an app that is plugin based. So that I can write a plugin to extend the functionality of the app. I imagine that I could copy the plugin into a folder from the

Re: Using .lib and .dll in D applications

2016-06-20 Thread moe via Digitalmars-d-learn
Thanks everyone for the info. It is very much appreciated! What works for me right now is dealing with various packages (dub packages) and use them in projects. I previously made too many assumptions about how lib's and dll's work. It's much clearer now. Where I still have a problem is with

Re: Using .lib and .dll in D applications

2016-06-19 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 19 June 2016 at 18:33:36 UTC, moe wrote: I see where I went wrong. I thought that it's possible to only use the .lib file without the source code of dbar. Having access to the source makes what I am trying somewhat pointless. Is it otherwise possible to provide some functionality

Re: Using .lib and .dll in D applications

2016-06-19 Thread captaindet via Digitalmars-d-learn
On 2016-06-20 06:33, moe wrote: I see where I went wrong. I thought that it's possible to only use the .lib file without the source code of dbar. Having access to the source makes what I am trying somewhat pointless. Is it otherwise possible to provide some functionality without having to give

Re: Using .lib and .dll in D applications

2016-06-19 Thread docandrew via Digitalmars-d-learn
On Sunday, 19 June 2016 at 18:33:36 UTC, moe wrote: On Sunday, 19 June 2016 at 18:00:07 UTC, Mike Parker wrote: On Sunday, 19 June 2016 at 17:33:43 UTC, moe wrote: Unfortunatelly I still don't get it. I would like to have an independant project "dbar". The created lib is then used in

Re: Using .lib and .dll in D applications

2016-06-19 Thread moe via Digitalmars-d-learn
On Sunday, 19 June 2016 at 18:00:07 UTC, Mike Parker wrote: On Sunday, 19 June 2016 at 17:33:43 UTC, moe wrote: Unfortunatelly I still don't get it. I would like to have an independant project "dbar". The created lib is then used in another project "dfoo". Assuming that "dfoo" has no

Re: Using .lib and .dll in D applications

2016-06-19 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 19 June 2016 at 17:33:43 UTC, moe wrote: Unfortunatelly I still don't get it. I would like to have an independant project "dbar". The created lib is then used in another project "dfoo". Assuming that "dfoo" has no access to "dbar" other than the .lib file. You can't do it

Re: Using .lib and .dll in D applications

2016-06-19 Thread moe via Digitalmars-d-learn
On Sunday, 19 June 2016 at 17:33:43 UTC, moe wrote: On Sunday, 19 June 2016 at 16:31:40 UTC, Mike Parker wrote: [...] Thanks for the reply. Unfortunatelly I still don't get it. I would like to have an independant project "dbar". The created lib is then used in another project "dfoo".

Re: Using .lib and .dll in D applications

2016-06-19 Thread moe via Digitalmars-d-learn
On Sunday, 19 June 2016 at 16:31:40 UTC, Mike Parker wrote: On Sunday, 19 June 2016 at 15:35:04 UTC, moe wrote: I am new to d and doing some small test apps at the moment to learn d. Currently I must be missing something basic here. I have installed dub as a project manager and I am trying to

Re: Using .lib and .dll in D applications

2016-06-19 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 19 June 2016 at 15:35:04 UTC, moe wrote: I am new to d and doing some small test apps at the moment to learn d. Currently I must be missing something basic here. I have installed dub as a project manager and I am trying to use a .lib file in an app. However, I can not use a module