Re: BOOST_LANGBINDING_DECL

Daniel Wallin <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
At 01:38 2003-07-30, David Abrahams wrote:

>IIRC, MinGW (and probably Cygwin, therefore) doesn't respond well when
>you try to use __declspec(dll-imp/exp-ort) for individual members of a
>class.  I get into trouble every time I do it.  That's why
>Boost.Python only exports entire classes.  I always add a layer of
>inheritance if I need to have inline or templated member functions in
>a class with exported members.

Ok. I am unable to get even the most trivial dll test with cygwin to work:

A.cpp:
struct __declspec(dllexport) A
{
   void f() {}
};

B.cpp
struct __declspec(dllimport) A
{
   void f();
};

int main()
{
   A a;
   a.f();
}

Jamfile:
dll A
         : A.cpp
         : <include>$(BOOST_ROOT)
         ;

exe B
         : B.cpp <dll>A
         : <include>$(BOOST_ROOT)
         ;

Fails when linking... What am I doing wrong?

---
Daniel Wallin



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.