[antlr-interest] Re: CircularQueue compilation question, please help.

jeff_c_lin jeff_c_lin at yahoo.com
Wed Mar 20 14:54:46 PST 2002


Hi Ric,

I managed to compile the dll. Thank you. But when I tried to link the export library with a simple parser, I get a lot of multiple definition errors. Not sure what is happening. Maybe I'll try STLport. If I ever do this successfully, I think I'll post a Antlr DLL HOWTO. :)

--- In antlr-interest at y..., Ric Klaren <klaren at c...> wrote:
> Hi,
> 
> On Tue, Mar 19, 2002 at 05:37:12AM -0000, jeff_c_lin wrote:
> > I have a question about the way CircularQueue is defined. It has a private
> > copy contructor and private assignment operator but they are not defined
> > anywhere (no CircularQueue.cpp). What's the purpose of these and why don't
> > they cause compilation error?
> 
> This prevents unintended use of default copy/assignment
> constructor/operators. As long as the constructor/operator is not used
> there is no problem. In the case of CircularQueue it might not be necessary
> to do this, I disabled all copy assignment constructors for classes that do
> not explicitly support them.
> 
> > I'm trying to compile antlr classes as an DLL, and I'm getting C4661
> > warning message. I instantiate CircularQueue when I see it used in as an
> > class member. For example, class InputBuffer has a CircularQueue<int>
> > member. According the MS Knowledge base, I need to instantiate a template
> > class in order to export it from an DLL. So after InputBuffer class
> > declaration, I do "template class DLLIMEXPORT CircularQueue<int>", but the
> > compiler warns that CircularQueue's member functions are not defined. I'm
> > surprised it's not an error. Anyone knows what's going on here? How do I
> > get rid of the warning messages?
> 
> Ignore them or use the appropriate #pragma or whatever MSVC uses. Depending
> on the version of antlr, the version of windows and the version of MSVC
> (and the STL you use) you may not succceed building a dll. Search the
> archives for some discussions on the subject (you may have to switch to
> STLPort).
> 
> Cheers,
> 
> Ric
> --
> -----+++++*****************************************************+++++++++-------
>     ---- Ric Klaren ----- klaren at c... ----- +31 53 4893722  ----
> -----+++++*****************************************************+++++++++-------
>   "I don't have anything against Java - it's the best damn implementation
> 				  of UCSD Pascal ever released..." --- Larry Smith


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list