[antlr-interest] (?_Lock@_Mutex@std) already defined in antlr.lib(TokenStreamRewriteEngine.obj

Ric Klaren ric.klaren at gmail.com
Mon May 9 00:13:32 PDT 2005


On 5/6/05, kiranreddyd <kiranreddyd at yahoo.co.in> wrote:
> I am using VC7 compiler....I have downloaded antlr-2.7.5.msi zipped
> and antlr-2.7.5.exe.
> 
> I have generated parser for the grammer using antlr-
> 2.7.5.exe...after that created a project and tried to build my
> project...
> 
> I am getting the following error: error LNK2005: "public: void
> __thiscall std::_Mutex::_Lock(void)" (?_Lock at _Mutex@std@@QAEXXZ)
> already defined in antlr.lib(TokenStreamRewriteEngine.obj)
> 
> My project includes someother files...but no where those files I am
> using _Mutex and _Lock...

This is probably something due to mixing different settings for
building the library and the project. Mutex & Lock hint that it's the
multithreading option (not a VC user so I don't know the details)

I have received some fixes for the TokenStreamRewriteEngine but I
don't think those would address this. Anycase if it's that specific
file that triggers stuff it is safe to omit it from the project unless
you need the functionality.

Cheers,

Ric


More information about the antlr-interest mailing list