Can't compile Antlr4 in VS2010 or 12

96 views
Skip to first unread message

r...@aarnts.com

unread,
Jul 19, 2013, 10:32:04 AM7/19/13
to antlr-di...@googlegroups.com
I have some problems creating an app using Antlr 4. I have done the following:
• Create a C# console app
• Create the reference dir and added the Antlr4.0 runtime files to that dir.
• Unloaded the project and added the text as proposed by Sam
<PropertyGroup>
<!-- Folder containing Antlr4BuildTasks.dll -->
<Antlr4BuildTaskPath>$(ProjectDir)..\Reference\Antlr4</Antlr4BuildTaskPath>
<!-- Path to the ANTLR Tool itself. -->
<Antlr4ToolPath>$(ProjectDir)..\Reference\Antlr4\antlr4-csharp-4.0.1-SNAPSHOT-complete.jar</Antlr4ToolPath>
</PropertyGroup>
<Import Project="$(ProjectDir)..\Reference\Antlr4\Antlr4.targets" />
• Reloaded the project again
• Added a Antrl 4 Combined Grammar
• Compiled the app
The result is the following error:
Error 1 Unknown build error: Object reference not set to an instance of an object. ConsoleApplication1

The output window gives the following info:
C:\test3\ConsoleApplication1\Reference\Antlr4\Antlr4.targets(129,5): error AC1000: Unknown build error: Object reference not set to an instance of an object.

Can anybody please help me?

Rob Aarnts

Sam Harwell

unread,
Jul 19, 2013, 8:55:14 PM7/19/13
to antlr-di...@googlegroups.com
Hi Rob,

If you have a 64-bit operating system, can you make sure you have both the 32-bit and 64-bit editions of the JDK 1.7 installed? The next release of the C# target properly detects any version you have installed, but the current alpha release isn't as robust.

Thank you,
--
Sam Harwell
Owner, Lead Developer
http://tunnelvisionlabs.com

-----Original Message-----
From: antlr-di...@googlegroups.com [mailto:antlr-di...@googlegroups.com] On Behalf Of r...@aarnts.com
Sent: Friday, July 19, 2013 9:32 AM
To: antlr-di...@googlegroups.com
Subject: [antlr-discussion] Can't compile Antlr4 in VS2010 or 12

I have some problems creating an app using Antlr 4. I have done the following:
* Create a C# console app
* Create the reference dir and added the Antlr4.0 runtime files to that dir.
* Unloaded the project and added the text as proposed by Sam
<PropertyGroup>
<!-- Folder containing Antlr4BuildTasks.dll -->
<Antlr4BuildTaskPath>$(ProjectDir)..\Reference\Antlr4</Antlr4BuildTaskPath>
<!-- Path to the ANTLR Tool itself. -->
<Antlr4ToolPath>$(ProjectDir)..\Reference\Antlr4\antlr4-csharp-4.0.1-SNAPSHOT-complete.jar</Antlr4ToolPath>
</PropertyGroup>
<Import Project="$(ProjectDir)..\Reference\Antlr4\Antlr4.targets" />
* Reloaded the project again
* Added a Antrl 4 Combined Grammar
* Compiled the app
The result is the following error:
Error 1 Unknown build error: Object reference not set to an instance of an object. ConsoleApplication1

The output window gives the following info:
C:\test3\ConsoleApplication1\Reference\Antlr4\Antlr4.targets(129,5): error AC1000: Unknown build error: Object reference not set to an instance of an object.

Can anybody please help me?

Rob Aarnts

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply all
Reply to author
Forward
0 new messages