[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

win api: wrapping all DLLs in a "re-export" DLL?

From: Stephen Davis <subversion_at_soundgeek.org>
Date: 2006-04-04 00:10:33 CEST

Hi,

I'm trying to port my CodeWarrior Subversion plugin (http://
www.soundgeek.org/software/SubversionPlugin/) to Windows and am
having quite a bit of difficulty since the svn libraries are built
with VC++ 6.0.

The Win32 Subversion libraries are built with VC++ 6.0 so they have
dependencies on the VC++ runtime (strcmp, abort, etc.). Since I'd
rather build my CodeWarrior plugin with CodeWarrior, linking against
the svn DLLs directly fails to link b/c of the missing runtime
functions (I'm not even sure I _can_ build a cw plugin with another
compiler...). The CodeWarrior equivalents don't use the __stdcall
convention so the CW runtime routines don't help.

I decided to try and build a "re-export" DLL which my CW plugin could
link against and it would wrap all of the svn/apr routines up inside
a nice single package that would work for me. I created a VC++ dll
project with no real code and an export file that specified all of
the routines I needed.

apr_initialize
apr_array_make
svn_client_version
...

This lets my CW plugin link but it crashes deep inside APR when it
tries to do anything. I'm also building a little command line test
app to remove the whole CW plugin architecture from the equation and
the same thing happens.

My question is this (and I am by no means a windows guy and may be
talking out of my butt which is why I'm here): I looked at the
apr.dll with Dependency Walker and it says most of the apr functions
are exported as "_apr_array_make@12" or something along those lines.
If that's true, why would the wrapper dll I made even link if I put
"apr_array_make" in the .def file instead of _apr_array_make@12? Do
I need to re-export the "actual" names like _apr_array_make@12?

And what's this "__imp_apr_array_make@12" business? That's what I
see in the disassembly for a call to apr_array_make() but don't see
that anywhere in the DLL via Dependency Walker.

While I'm here, would you guys consider updating to VS 2005 (i.e.
8.0) for the next release? :-)

thanks,
stephen

P.S. I have tried to get open source projects in the past to build
with CW and it is a royal PITA so that's not really a feasible option
unless someone out there can tell me they've built Subversion with CW
for Windows. Please let me know!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Apr 4 00:11:51 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.