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

4822Re: [antlr-interest] Re: More VC++ 6 Confusion (MFC libs)

Expand Messages
  • Ric Klaren
    Jan 3, 2002
    • 0 Attachment

      On Mon, Dec 31, 2001 at 11:52:04PM -0000, jsrs701 wrote:
      > > 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.

      The DLL export stuff is already in antlr-2.7.2a1. It's only called
      ANTLR_API now (used a different patch than the one in contrib).

      > 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.

      Hmmm strange I cannot recall removing the file. Then again I had planned on
      including the DLL build in 2.7.2. That was before running into a whole lot
      of trouble with MSVC6. It really barfs on a dll build.

      It refuses to compile/link. My impression (going on the fuzzy error
      messages it is giving) is that it does not support linking STL stuff into
      DLL's (can this be true?? at least I'm missing the dllexport stuff in the
      stl headers..)??

      Doing explicit instantiations ala (with some msvc extension):

      #if defined(_MSC_VER) && !defined(__ICL) // Microsoft Visual C++
      extern template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector<int>;

      Seems not to work?

      I'm not a MSVC expert so I'm hoping some more knowledgeable MSVC6 hacker
      may want to fix the toplevel .dsw .dsp files. It may require adding a few
      directories to the lib/cpp tree for the .dll and the .lib build.


      ---- Ric Klaren ----- klaren@... ----- +31 53 4893722 ----
      Time what is time - I wish I knew how to tell You why - It hurts to know -
      Aren't we machines - Time what is time - Unlock the door
      - And see the truth - Then time is time again
      From: 'Time what is Time' by Blind Guardian
    • Show all 10 messages in this topic