openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] CreateDLL eliminates C style wrapper functions


From: Stephan Menzel
Subject: Re: [Openexr-devel] CreateDLL eliminates C style wrapper functions
Date: Fri, 12 Mar 2010 16:12:44 +0100

On Fri, Mar 12, 2010 at 10:43 AM, Ger Hobbelt <address@hidden> wrote:
> The great thing is it already public as it's part of OpenEXR. It's just not
> obvious, 's all.

Well, I guess it ought to be obvious. Because....

> And your idea hit me as well 1-2 years ago, after 10+ yrs of UNIX vs.
> Windows porting hassle. It's a bit wicked, but when you've done enough DEF
> files and pragma dllexport (which is mindboggling when you really start
> using C++ templates in a DLL) you 'know' this is the way, no matter how
> kludgy or klunky or whatever it may seem at first. Applying CreateDLL to our
> customized OpenSSL extender has cleaned up the code like you wouldn't
> believe!

This is exactly my experience. And I just don't want to mess with all
this Windows crap anymore. After weeks and weeks being spent in just
this mess of pragmas and dll decorators I get the impression that the
art of portable C++ is nowadays simply the art of taming MSVC. Well,
not simply so to speak. Anyway, maybe one should consider extracting
CreateDLL from the ILM distros and making it an own project. A fork
based upon your modifications perhaps.

Imagine! If one could come up with a simple Open Source tool that
liberates thousands of developers from the pain of having to deal with
this!
I can safely say, that would have saved me a net of 2 to 3 man months
last year. It would be more popular than "make"

It would just have to be polished a bit, tested documented and
embedded in some sort of framework for ease of use.
In our projects we use cmake and we have quite extensive knowledge
about it, having wrought a whole framework around it to enable easy
portable (Win/Lin) lib development. We already included plenty of post
build steps and MS specific things, also depending on one another. I
believe it should be possible to create a semi self-contained CMake
module out of CreateDLL that would create a full Windows DLL from the
same source code as a portable one without a single Windows specific
thing in the code. Good lord, I get excited from the very thought!

You could even deliver it bundled with another tool (python?) that
cleans up code from all that crap that would be no longer needed.
What do you think?

Cheers,
Stephan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]