双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

VC新建动态链接库,换个函数又出错,求助妖哥

liu_huasheng liu_huasheng 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
新建一个newdll工程,头文件newdll.h中声明:
extern "C" _declspec(dllexport) string _stdcall transfer2Pin(string const & input);

newdll.cpp中定义:
#include<string.h>
#include"newdll.h"
string __stdcall transfer2Pin(string const & input)//汉字转换成拼音
{
string result;
......
return result;
}
原来的int sum(int a,int b)函数编译没有问题,为什么换个函数就编译不通了?
error C2143: syntax error : missing ';' before '__stdcall'
error C2143: syntax error : missing ')' before 'const'
error C2501: 'transfer2Pin' : missing storage-class or type specifiers
error C2086: 'transfer2Pin' : redefinition
...
...全文

相关推荐

评论 8
收藏 已收藏
分享
返回顶部
liu_huasheng
C++ Builder 13,871 成员 102,696 内容