Afficher un message
Vieux 15/10/2007, 23h53   #4
Erik Wikström
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Portable shared library design

On 2007-10-15 23:59, Kenneth Porter wrote:
> =?UTF-8?B?RXJpayBXaWtzdHLDtm0=?= <Erik-wikstrom@telia.com> wrote in
> news:imQQi.11431$ZA.7495@newsb.telia.net:
>
>> You are right about this not being a C++ question, so for future
>> questions regarding DLLs please use a more appropriate group (I think a
>> win32 programming group would be the right choice). Here is a tutorial
>> to get you started: http://www.codeproject.com/dll/RegDLL.asp

>
> I think ghetto-izing shared library implementation should be discouraged.
> Instead, consider ways to design sharable libraries that can be used on
> many platforms (not just Win32). For example, is there any standardization
> effort in creating syntactic linkage hints such as this kind of
> import/export decorator?


There is very little in the way of standardising shared libraries. The
latest effort I can find on standard committee's site (N2407) is little
more than a description of the problem, an investigation of how it is
done on Windows and Linux and a suggestion of how to specify what should
be exported or not. This late in the process I would not expect it to be
included in the next version of the standard.

> My biggest hassle so far in portable shared libraries is the use of STL
> objects (particularly containers) in public classes. The MS compiler will
> whine that those classes need DLL linkage. Is gcc under Linux subject to
> the same problem? How can I design the classes so that I don't face this?


I *think* that by default everything is exported on Linux, while you
have to explicitly export it on Windows.

--
Erik Wikström
  Réponse avec citation
 
Page generated in 0,06123 seconds with 9 queries