[ libetpan-Patches-1462268 ] missing exports for mailfolder, compiling on msvc

"SourceForge.net" <[email protected]> Wed, 05 Apr 2006 00:46:55 -0700
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
Patches item #1462268, was opened at 2006-03-31 19:07
Message generated for change (Comment added) made by smarinier
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=429698&aid=1462268&group_id=41064

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: Latest development - libEtPan!
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Leupold (lemma)
Assigned to: Nobody/Anonymous (nobody)
Summary: missing exports for mailfolder, compiling on msvc

Initial Comment:
Hi there,

Compiling the basic example 5-2. (use of folder) in 
the API Documentation doesn't work in MSVC as 
mailfolder_get_messages_list isn't exported when 
compiling libetpan as a dll - in fact none of the 
symbols of mailfolder.h is exported.
As all seem to be part of the API I assume this isn't 
meant to be. In fact, adding a few LIBETPAN_EXPORTs 
seems to work.
Being new to libetpan AND msvc I'm not sure if the 
patch causes any issues, but as LIBETPAN_EXPORT only 
affects builds on msvc it at least shouldn't affect 
any other platform.

The patch is created using cvs diff -u versus the 
current cvs version (mailfolder.c r1.4, mailfolder.h 
r1.3).


----------------------------------------------------------------------

Comment By: Sebastien Marinier (smarinier)
Date: 2006-04-05 09:46

Message:
Logged In: YES 
user_id=1289040

LIBETPAN_EXPORT doesn't "affect" the library. It's a simple
define (libetpan-config.h) modifying, in Windows context,
the way some functions are declared.
Preceeding functions with LIBETPAN_EXPORT make, on Windows,
these functions accessibles from the libetpan DLL by other
DLL's or programs. You might add LIBETPAN_EXPORT before any
function you want to use.
Today, LIBETPAN_EXPORT isset only before a reduce set of
functions because:
 - Some functions are internals and don't really need to be
accessible. As all the exported functions from a DLL are
"resolved" on the load on the DLL, it's (in theory) better
not to export all the unused functions. 
 - it's a boring job. If anyone want to do it...
 - i did it for the functions i need. You might do the same ;)

So. this define is not reduced by integrism, but mainly
because the Windows port i made is a "first step". Do not be
afraid to export the functions you need.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=429698&aid=1462268&group_id=41064


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642