Loading ...
Sorry, an error occurred while loading the content.

4817Re: More VC++ 6 Confusion (MFC libs)

Expand Messages
  • isabellemus
    Jan 1, 2002
    • 0 Attachment
      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)
      #define DllImpExp __declspec(dllimport)
      #endif /* BUILD_ANTLR_DLL */
      #else /* WIN32 && _MSC_VER */
      #define DllImpExp

      where BUILD_ANTLR_DLL should be defined when building the DLL. The
      pain is modifying the class declarations you want exported to

      DllImpExp MyClass {} ;


      --- In antlr-interest@y..., "jsrs701" <jsrs701@y...> wrote:
      > --- In antlr-interest@y..., "isabellemus" <meta.logix@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
      > for building an ANTLR DLL, it mentions a replacement file
      > (config.hpp) that contains a macro called DLLEXPORT.
      > 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
      > to deal with the messy C++ munged symbols. Ugh. Better to stick
      > with the dllimport and dllexport declspecs on the classes
      > On second thought, anybody know where that config.hpp file got off
      > to? Ter, Ric? It's the file Michael Richter mentions in his
      > JSRS
    • Show all 10 messages in this topic