[antlr-interest] Re: More VC++ 6 Confusion (MFC libs)
isabellemus
meta.logix at pandora.be
Tue Jan 1 06:20:40 PST 2002
The import/export declaration isn't that hard (see below)
#if defined(WIN32) && defined(_MSC_VER)
#if defined(BUILD_ANTLR_DLL)
#define DllImpExp __declspec(dllexport)
#else
#define DllImpExp __declspec(dllimport)
#endif /* BUILD_ANTLR_DLL */
#else /* WIN32 && _MSC_VER */
#define DllImpExp
#endif
where BUILD_ANTLR_DLL should be defined when building the DLL. The
pain is modifying the class declarations you want exported to
DllImpExp MyClass {} ;
Isabelle
--- In antlr-interest at y..., "jsrs701" <jsrs701 at y...> wrote:
> --- In antlr-interest at y..., "isabellemus" <meta.logix at p...> wrote:
> > Hi,
> >
> > Try using the static antlr library, works for me (use the LIB
> project
> > in MSCV6-dll directory).
> >
> > I have a different problem with using the dll : I cannot get MSVC
> to
> > generate an import library (don't have a .def file), and cannot
> find
> > any export declarations in the source.
> >
> > Isabelle
>
> The import library issue is a messy one. In one of the contrib
items
> for building an ANTLR DLL, it mentions a replacement file
> (config.hpp) that contains a macro called DLLEXPORT.
Unfortunately,
> I can't find any trace of this file, nor the macro. Hm.
>
> You probably don't want to do a .def file, though, since you'll
have
> to deal with the messy C++ munged symbols. Ugh. Better to stick
> with the dllimport and dllexport declspecs on the classes
themselves.
>
> On second thought, anybody know where that config.hpp file got off
> to? Ter, Ric? It's the file Michael Richter mentions in his
README.
>
> JSRS
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list