从visualC ++编译器2008编译c代码,代码来自linux os [英] compilation of c code from visualC++compiler 2008 and code is from linux os

查看:60
本文介绍了从visualC ++编译器2008编译c代码,代码来自linux os的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码已经从linux平台上获取并尝试使用vc ++ 2008在Windows上编译

code has been taken frm linux platform and try to compile it on windows using vc++2008

展开 | 选择 | Wrap | 行号

推荐答案

代码已经从linux平台上获取并尝试使用vc ++ 2008在Windows上编译它
code has been taken frm linux platform and try to compile it on windows using vc++2008
展开 | 选择 | Wrap | 行号


代码stangely并且不必要地将从调用invokelicenseupdate返回的值强制转换为char *,然后分配给int。删除演员。


我想在Linux上它正在为C99编译,visual C支持C89,在第151行,你不能在代码块中间声明一个变量它需要在代码块的开头(printf之前)声明。
The code stangely and unnecessarily casts the value returned from calling invokelicenseupdate to char * and then assigns to an int. Remove the cast.

I guess on Linux it was compiling for C99, visual C supports C89 and at line 151 you can not declare a variable half way through the code block it needs to be declared at the start of the code block (before the printf).


在函数invokelicenseupdate中,

声明licenseupdateresult函数开头的变量。 ie

In function "invokelicenseupdate",
declare "licenseupdateresult" variable at the beginning of the function. i.e.

展开 | 选择 | Wrap | 行号


这篇关于从visualC ++编译器2008编译c代码,代码来自linux os的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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