在DLL中使用Antlr

.-noscript-blocked { border: 1px solid red !important; background: white url("chrome://noscript/skin/icon32.png") no-repeat left top !important; opacity: 0.6 !important; }

新建一个Win32 DLL项目,设置如下

* Project settings ("create new project" dialogs)
- Win32 project
- Application Settings
- Application type
- DLL
- Additional options
- Export symbols
* Project properties (change defaults to)
- Configuration Properties
- C/C++
- General
- Additional Include Directories
- drive:\antlr-2.7.2\lib\cpp
- Preprocessor
- Preprocessor Definitions
- WIN32;_DEBUG;_WINDOWS;_USRDLL;ANTLR_EXPORTS
- Code Generation
- Runtime Library
- Multi-threaded Debug DLL (/MDd)
- Enable Function-Level Linking:
- Yes
- Language
- Enable Run-Time Type Info
- Yes
- Precompiled Headers
- Create/Use Precompiled Headers

将antlr的cpp的源代码添加到项目中,注意对于VC7.1需要排除dll.cpp,然后编译即可。