I’ve been do research into a cross-platform
method of dynamically loading c++ implementations
at runtime. During this research I needed to know
how to use dlls on windows. The attached dll is
how to produce and use dlls in C. C++ is a
different matter entirely. But if your interested
I can share what solutions I’ve come up with to
date. Anyway I’m not an expert on using dlls, as
windows isn’t what I develop on normally, but the
following will be usefull
Unzip the attached file into a directory and just
do “make clean && make all”. The makefile produces
a dll called “one.dll” and a library called
"libone.import.a". In order to use the dll this
library is linked with “prog.o” to produce the
final executable “prog.exe”. The "one.dll"
must be in your path or in the directory with
the “prog.exe” program.
There are a number of things that need to be noted.
The first is that in producing the dll, you need
to specify what symbols are to be exported to the
eventual dll. I’ve been told that you need to use
"__declspec(dllexport)" before each symbol you
want to export. You also need to use
"__declspec(dllimport)" when you wish to refer to a
symbol which is part of a makefile. Apparently this
step isn’t really needed but I’m putting it there
to be strickly correct. In “one.h” is a macro used
to select the correct one.
Hopefully the above is of some use. There are
probably things I’ve forgotten to mention, but its
early monday morning and I’m tired, so please forgive
any errors in this knocked-together tutorial. All
om> ----- Original Message -----
Hi. This is probably off topic.
I wrote a small program to test SDL, it compiles, I got the .h files. I
also downloaded the binary distribution it’s a .dll file. So my question
is: how do I use that dll file on my program? (to build the .exe and run it
Can someone point me to a tutorial or something?
-------------- next part --------------
A non-text attachment was scrubbed…
Size: 1036 bytes
Desc: not available