I’ve written a few C functions which I can access on the Windows, Linux and Mac platforms by compiling it into a dll, so or dylib file.
I’m using mingw to create the dll on windows but I think that’s besides the point.
I’m testing this on windows right now. I’m using a declare to initialise the function inside the dll, it’s placed in libs/printdll.dll which is fine once it’s built and I run the program in a directory which contains a ‘libs’ sub directory which contains the dll in question. It works fine once compiled.
Is there any way for me to use the compiled C functions when I click the big green ‘Run’ button in the Xojo IDE ?
Maybe there’s some kind of directive to allow me to specify that when the program’s running in the IDE mode it should load the DLL from somewhere else - a specific location ? If so, I’d like to know how to do this, everything I’ve tried has failed and I can’t find any way to do this.
For example in windows I can use something like this :
Declare Function printdll Lib “libs/printdll.dll” () as Integer
Does anyone have any idea how I can do this so I can test the program as I write it without having to continuously build it each time I make a change ?
Maybe there’s an option like this :
Declare Function printdll Lib “O:\c\dlltest\libs\printdll.dll” () as Integer
I’ve played around with the filename and I can’t seem to get it to find the DLL when I click the Run button at all, it only works when the app is compiled and then executed separately.
For example I’ve tried the following :
Both fail even with hard coded paths when I run the program inside the IDE saying it can’t find the DLL which is strange as the DLL is right where it should be.
This is a console app, I’m not sure if that makes any difference.
Does anyone have any idea what I’m doing wrong or is what I’m trying to do not possible ?