游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1794|回复: 4

求教:编译上的错误

[复制链接]

13

主题

16

帖子

34

积分

注册会员

Rank: 2

积分
34
发表于 2004-9-3 19:37:00 | 显示全部楼层 |阅读模式
此为MAXSDK\samples\impexp\asciiexp   中的项目

在VC6.0下编译时出现的问题:

Compiling...
asciiexp.cpp
d:\3dsmax5\maxsdk\samples\impexp\asciiexp\asciiexp.cpp(203) : error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,lo
ng)'
        None of the functions with this name in scope match the target type
d:\3dsmax5\maxsdk\samples\impexp\asciiexp\asciiexp.cpp(367) : error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,lo
ng)'
        None of the functions with this name in scope match the target type
Error executing cl.exe.

68

主题

710

帖子

719

积分

高级会员

Rank: 4

积分
719
QQ
发表于 2004-9-3 19:41:00 | 显示全部楼层

Re:求教:编译上的错误

HWND

13

主题

16

帖子

34

积分

注册会员

Rank: 2

积分
34
 楼主| 发表于 2004-9-3 19:49:00 | 显示全部楼层

Re: 求教:编译上的错误

能否详细一点

1

主题

11

帖子

11

积分

新手上路

Rank: 1

积分
11
发表于 2004-9-3 21:09:00 | 显示全部楼层

Re:求教:编译上的错误

函数所用参数的类型不对....你最好把代码贴出来....
否则可能别人讲解你不太能理解....

0

主题

32

帖子

32

积分

注册会员

Rank: 2

积分
32
发表于 2004-9-4 19:39:00 | 显示全部楼层

Re:求教:编译上的错误

仅调用规则不同,源码相应位置所传入的那个函数在声明时需在之前加上__stdcall,否则编译器默认为__cdecl(不过也可通过修改编译选项来改变这个值)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-8-18 02:03

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表