[ 本帖最后由 judou 于 2007-1-10 10:07 编辑 ]作者: xiaoyao520 时间: 2007-1-10 10:43
前面定义的char *result;为 char型,那么如果 result = getCodeFromFileAdv("c:\\temp\\code.bmp","","25","25_1");这一步能正确地返回值的话,那么输入出应该是lr_message("%s",result);
如果Message Formatting为%c的话,那么你的应该是一个int型.详细如下:
Character Argument Type Printed As
d,i int decimal number
o int unsigned octal number without a leading zero
x,X int unsigned hexadecimal number without a leading 0x
u int unsigned decimal number
c int single character
s char * print characters until either `\0' or the number of characters giv en in the precision is reached
e,E double engineering notation (m.dddddd e+exponent). If precision is greater than fractional part, prints trailing zeros
g,G double engineering notation without trailing zeros or trailing decimal point
% none print the character `%'作者: judou 时间: 2007-1-10 11:15
按照你得写法
char *result;
lr_load_dll("c:\\temp\\NdOcr.dll");
loadLib("c:\\temp\\NdOcr25.dll","25","c:\\temp\\25_1.lib","");
result = getCodeFromFileAdv("c:\\temp\\code.bmp","","25","25_1");
//到这步,getCodeFromFileAdv 已经能够有正确结果返回了, 但下一步用变量result 取得时候,取不到数值
//估计就是 格式 或者 数据类型上得问题
//result = lr_eval_string(result);
lr_message("识别结果为: %s",result);
有错误提示:
Action.c (14): operands of = have illegal types `pointer to char' and `int'
c:\\documents and settings\\administrator\\\327\300\303\346\\test\\\\combined_test.c (5): 1 errors, not writing pre_cci.ci作者: judou 时间: 2007-1-10 12:47
tttt作者: AlanStone 时间: 2007-1-10 13:28
sdlkfj2 sdlkfj2 sdlkfj2