Generating import libraries with MSVC

Greetings,
I feel a little ashamed to have to ask such a question, but actually I have to confess that I’m not that used to library development under Windows.

Anyway, here is my issue :
I have been using a set of custom classes, built into separate shared libraries (.so) with gcc on UNIX, and built into a single DLL with msvc++ on Windows.
Using ROOT in interpreted mode, I can load these libraries without any problem be it on UNIX or WIN32.
On UNIX, I can also make standalone programs using TGApplication and link them to the .so libraries.
However, it seems that in order to use the DLLs on Windows with standalone programs, I have to link them to “import libraries” (.lib). And actually, I have really no idea on how to produce them with msvc++. A peek into the developper help told me to put something like “__export” into the function names I wanted to be exported, but obviously the ROOT source code doesn’t show such constructs. Therefore, there has to be a correct way to do this that I don’t know.

Would anyone be kind enough to enlighten me ?
Thanks a lot.

[quote=“Cochonou”]Greetings,
I feel a little ashamed to have to ask such a question, but actually I have to confess that I’m not that used to library development under Windows.

Therefore, there has to be a correct way to do this that I don’t know.

Would anyone be kind enough to enlighten me ?
Thanks a lot.[/quote]

Look up
$ROOTSYS/test/Makefile.win32
file.

The rule:

$(EVENTSO): $(EVENTO)

shows how to create the expoprt/ impoprt library under Windows

Allright !
After a lot of fumbling, I finally got it working.
Thanks fot he help, it is not always easy to find its way into a Makefile :slight_smile: