如何在 MSVC 中创建 WT 项目?
如果有人成功地将 WT 与 MSVC 一起使用(我的是 2005 年),您能否提供一些有关如何完成此操作的详细信息? 我已经安装好了 WT ,然后运行了一些示例。当我尝试创建自己的项目(如 hello.C 一样简单)时,问题就开始了。我收到一千个这样的编译器错误:
C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdio(25):错误 C2143:语法错误:在“:”之前缺少“{”
可能需要一些项目调整,尽管尝试了,但我还是无法弄清楚几个小时...任何帮助将不胜感激。
[编辑] WT 是 诙谐 (webtoolkit.eu)
If anyone has used WT successfully with MSVC (mine is 2005), could you please provide some details on how this can be done?
I have installed WT fine , then ran some examples. The problems begin when I try to create a project of my own, as simple as hello.C. I get a thousand compiler errors like this one :
C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdio(25) : error C2143: syntax error : missing '{' before ':'
Possibly some project tuning is required, which I could not figure out, despite trying for many hours...Any help will be appreciated.
[Edit] WT is the Witty (webtoolkit.eu)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过几天的搜索和谷歌搜索后,似乎必须使用 CMake 才能构建 WT 项目。 此页面解释了该过程。希望它能为您节省一些时间。
Well after searching and googling around for some days , it seems that using CMake is a must in order to build a WT project. This page explains the procedure. Hopefully it will save you some time.
随机尝试一下:尝试将文件重命名为“hello.cpp”。 MSVC 默认将 .c 文件编译为 C,而不是 C++。
我通过谷歌找到的第一个 WT 结果是 Jason D 链接的结果。它是一个 C++ 库,而不是 C 库。
如果这没有帮助,请提供更多信息,包括“WT”代表什么,以及一些简短的示例代码。
Taking a random stab: Try renaming your file "hello.cpp". MSVC compiles .c files as C by default, not C++.
The first result for WT I found via google is the one Jason D linked. It is a C++ library, not a C library.
If this doesn't help, please provide more info, including what "WT" stands for, and some of your short sample code.