使用Microsoft SDK文件编译错误 [英] compile erros with Microsoft SDK files

查看:73
本文介绍了使用Microsoft SDK文件编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行构建,其中一条早期消息是:

I'm doing a build and one of the early messages is:

WINVER not defined.  Defaulting to 0x0600 (Windows Vista)

然后我用这个文件编译错误:

and then I get compile errors with this file:

c:\program files\microsoft sdks\windows\v6.0a\include\netioapi.h

三个错误是:

error C2146: syntax error : missing ';' before identifier...

error C4430: missing type specifier - int assumed.  Note: C++ does not support default-int

error C4430: missing type specifier - int assumed.  Note: C++ does not support default-int

现在从最后两个我可以看出它与我正在使用的编译器版本有关。 我正在使用VS2008。 在这些文件的路径中,我看到"v6.0a"所以我想知道这个SDK是否适用于Visual C ++ 6.0?

Now from the last two I can tell it is something with the version of compiler I am using.  I am using VS2008.  In the path to these files I see "v6.0a" and so I wonder if this SDK is for Visual C++ 6.0?

这是真的吗? 我必须安装一个新版本的SDK,与VS2008兼容吗?

Is this true?  I must install a new version of the SDK, compatible with VS2008?

推荐答案

>从最后两个我可以告诉它是与

>我使用的编译器版本。



不完全正确。没有最新版本的任何C ++编译器,如果未指定类型,则
默认为int类型。

ANSI / ISO标准C ++不支持Implicit int。 />


显示的第一个错误将导致后两个。

第一个错误可能是由于丢失或者是
程序中不完整的头文件。你应该b
有b

incin< windows.h>

$
作为第一个包含在您的代码中。



>在这些文件的路径中,我看到"v6.0a"所以我用
>想知道这个SDK是否适用于Visual C ++ 6.0?
$


编号Win SDK的版本没有任何关系

到C ++编译器的版本。这是VC ++ 2008的正确的
版本,是SDK的版本

,将与VC ++ 2008一起安装,以


- Wayne
>from the last two I can tell it is something with the
>version of compiler I am using.

Not exactly. No recent version of any C++ compiler will
default to type int when a type ison't specified.
Implicit int is not supported by ANSI/ISO Standard C++.

The first error shown will result in the second two.
That first error is probably caused by a missing or
incomplete header file in your program. You should
have

#include <windows.h>

as the first include in your code.

>In the path to these files I see "v6.0a" and so I
>wonder if this SDK is for Visual C++ 6.0?

No. The version of the Win SDK has no relationship
to the version of the C++ compiler. That is the
correct version for VC++ 2008 and is the version
of the SDK which will be installed with VC++ 2008,

- Wayne


这篇关于使用Microsoft SDK文件编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆