VC++程序函数修改,不知道怎么修改了,老是出错。 10
这个是之前可以正常使用的方法,参数是从控件台写入的:intmain(intargc,char*argv[],char**env){setlocale(LC_ALL,"")...
这个是之前可以正常使用的方法,参数是从控件台写入的:
int
main(int argc, char * argv[], char **env)
{
setlocale(LC_ALL,"");
djvu_programname(argv[0]);
exit(realmain(argc,argv));
#ifdef WIN32
return 0;
#endif
}
我要修改成参数不从控制台写入,我是这样写的:
BSTR CPdftodjvuCtrl::doconversion()
{
CString strResult;
setlocale(LC_ALL,"");
char * argv2[]={"testinfo","testinfo"};
//djvu_programname(argv[0]);
realmain(2,argv2);
return strResult.AllocSysString();
}
我这样写程序就不能编译,老是出错了
PdftodjvuCtl.cpp
Linking...
LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in msvcrt.lib(MSVCRT.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrt.lib(MSVCRT.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrt.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrt.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj) 展开
int
main(int argc, char * argv[], char **env)
{
setlocale(LC_ALL,"");
djvu_programname(argv[0]);
exit(realmain(argc,argv));
#ifdef WIN32
return 0;
#endif
}
我要修改成参数不从控制台写入,我是这样写的:
BSTR CPdftodjvuCtrl::doconversion()
{
CString strResult;
setlocale(LC_ALL,"");
char * argv2[]={"testinfo","testinfo"};
//djvu_programname(argv[0]);
realmain(2,argv2);
return strResult.AllocSysString();
}
我这样写程序就不能编译,老是出错了
PdftodjvuCtl.cpp
Linking...
LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in msvcrt.lib(MSVCRT.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrt.lib(MSVCRT.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrt.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrt.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj) 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询