[quote=“SigmaDeltaRob”]
They seem to absolutely detest dynamic linking :-\ It’d not be hard to make JUCE a dll, but the problem is once you want to use it in an app via mingw/gcc, they want the lib to be statically linked.[/quote]
I got dynamic linking working.
I used the dll for SQLite (which is a superb lightweight sql database if anyone wants one). All I needed to do was create a header file for the dll, as such:
[code]#ifndef SQLITE3_H
extern “C” {
typedef struct sqlite3 sqlite3;
const char* __declspec(dllimport) sqlite3_libversion(void);
int __declspec(dllimport) sqlite3_close(sqlite3*);
int __declspec(dllimport) sqlite3_open(const char*, sqlite3**);
}[/code]
and include it in my main app. I then simply added “-L. -lsqlite3” to the linker properties and I could successfully open and close a database.
The excutable size remained at just 20k, so there was no risk that the sqlite3.dll file had just been glommed into the exe.
Trying it with wininet.dll or msvf32.dll (or whatever its called), is a bit more challenging… I got all sorts of weird runtime bugs once I got it to compile. Mostly memory leaks.
[quote=“SigmaDeltaRob”]Yep. Been there, done that :-\
Trying it with wininet.dll or msvf32.dll (or whatever its called), is a bit more challenging… I got all sorts of weird runtime bugs once I got it to compile. Mostly memory leaks.[/quote]
What functions specifically are you trying to export from these dlls?
[quote=“valley”][quote=“SigmaDeltaRob”]Yep. Been there, done that :-\
Trying it with wininet.dll or msvf32.dll (or whatever its called), is a bit more challenging… I got all sorts of weird runtime bugs once I got it to compile. Mostly memory leaks.[/quote]
What functions specifically are you trying to export from these dlls?[/quote]
Id have to go break it again to figure it out… trying to see if borland works atm.
[quote=“SigmaDeltaRob”]I just downloaded this 300+ mb file, fooled with borland’s “account” crap…
to find out…
it uses MinGW.
grrr. perhaps it’s more friendly interface for it though.[/quote]
MinGW is one option… but by defautl it actually uses the Borland C++ Builder compiler. That is the one that spews all the errors… while mingw gets pretty far (for obvious reasons).
Maybe you can figure out how to make it compile with the borland compiler… I’ve tried all day with lno success.
Just had a go with the Borland compiler - what a piece of crap!
I’ll put some fixes in so that the next release of juce builds with it, but I’m not impressed by some of the stuff it refuses to compile - I mean, people actually pay money for this thing??