[antlr-interest] Linker errors linking antlr 2.7.7 to product library using vc6

Stuart Dootson stuart.dootson at gmail.com
Sat Jun 23 15:43:31 PDT 2007


On 23/06/07, Neeraj Joshi <jneeraj at us.ibm.com> wrote:
>
> Hi All,
> I compiled antlr 2.7.7 using vc6 without any trouble, however I am running
> into linker errors while linking the generated antlr.lib with my product
> code. In one of the older posts I found a reference advising to use /MTd
> flag while compiling. But that doesn't seem to help.
> Any help is greatly appreciated!
> Thanks in advance
> Neeraj
>
> ps.
>

Neeraj - you need to compile the Antlr runtime library *and* your code
with the same C runtime library options. So, if you compile the
library with /MTd, you need to compile your code /MTd.

I usually incorporate the Antlr runtime into my VC++ workspace as a
static library project, so that I can ensure that my application gets
linked against the correctly compiled Antlr runtime.

Stuart Dootson


More information about the antlr-interest mailing list