节俭设置问题

发布于 2024-12-21 04:08:17 字数 1539 浏览 0 评论 0原文

我有 VS 2010 并且已经下载了所需的 tar &来自 Apache Web 的 zip 文件。 thrift 文件夹中基本上有两个 VC++ 项目。一个位于 thrift-0.8.0\thrift-0.8.0\lib\cpp\thrift.sln ,另一个位于 thrift-0.8.0\thrift-0.8.0\compiler \cpp\compiler.sln,所以基本上是两个项目。 我已经成功编译了 thrift.sln 项目,并且能够成功生成两个 lib 文件 libthrift.liblibthriftnb.lib。在这之后我有几个问题。

a) 现在如何生成这个 thrift.exe
b) 我尝试编译 compiler.sln 项目,但出现以下错误:

Build started: Project: compiler, Configuration: Debug Win32 ------
flex' is not recognized as an internal or external command,
operable program or batch file.
bison' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: The command "flex -o "src/thriftl.cc" src/thriftl.ll
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: :VCEnd" exited with code 9009."

c) 现在如何编译 thrift 文件?

出于测试目的,我直接从 Apache 网站下载了 thrift exe,并创建了一个示例 thrift 程序,但出现错误:

[ERROR:E:/thrift-0.8.0/thrift-0.8.0/lib/cpp/Debug/calculator.thrift:3] (last to
en was '02')
syntax error
[FAILURE:E:/thrift-0.8.0/thrift-0.8.0/lib/cpp/Debug/calculator.thrift:3] Parser
error during include pass.

请建议
提前谢谢大家..

I have VS 2010 and have downloaded the required tar & zip files from Apache web. There are basically two VC++ Projects in the thrift folder. One is at thrift-0.8.0\thrift-0.8.0\lib\cpp\thrift.sln and another one is at thrift-0.8.0\thrift-0.8.0\compiler\cpp\compiler.sln, so basically two projects.
I have compiled successfully the thrift.sln project and am able to generate successfully the two lib files libthrift.lib and libthriftnb.lib. Now after this I have couple of questions.

a) How do I generate this thrift.exe now?
b) I tried compiling compiler.sln project but am getting the error below:

Build started: Project: compiler, Configuration: Debug Win32 ------
flex' is not recognized as an internal or external command,
operable program or batch file.
bison' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: The command "flex -o "src/thriftl.cc" src/thriftl.ll
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: bison -y -o "src/thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: :VCEnd" exited with code 9009."

c) How do I compile the thrift file now?

For testing purposes, I directly downloaded the thrift exe from the Apache website and have created a sample thrift program but I'm getting an error:

[ERROR:E:/thrift-0.8.0/thrift-0.8.0/lib/cpp/Debug/calculator.thrift:3] (last to
en was '02')
syntax error
[FAILURE:E:/thrift-0.8.0/thrift-0.8.0/lib/cpp/Debug/calculator.thrift:3] Parser
error during include pass.

Please suggest
Thanks in advance guys..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

腻橙味 2024-12-28 04:08:17

Apache Web 上提供的 Thrift Exe 是 Win32 编译的 Exe,因此您可以直接使用 Thrift 文件创建自动生成的代码,并带有所需的语言标志
Thrift -c java tezt.thrift, &然后可以用于IPC。

Thrift Exe which is provided on Apache Web is Win32 Compiled Exe, So you can directly use to create autogenerated code from your Thrift file, With required flag for language
Thrift -c java tezt.thrift, & then can use in for IPC.

月隐月明月朦胧 2024-12-28 04:08:17

从 thrift 版本 0.10.0 开始,

thrift 编译器项目为 compiler\cpp\compiler.vcproj。它依赖于 Flex 和 Bison (WinFlexBison for Windows),这就是错误所指示的。

或者,您可以使用 CMake 文件生成 Visual Studio 解决方案。

有关详细说明,请参阅Windows 上的 Apache Thrift

As of thrift version 0.10.0

The thrift compiler project is compiler\cpp\compiler.vcproj. It has dependencies on Flex and Bison (WinFlexBison for Windows) which is what the error is indicating.

Alternatively, you can use the CMake files to generate visual studio solutions.

See Apache Thrift on Windows for detailed instructions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文