当前位置: 技术问答>linux和unix
编译microwindows0.91自带的test.c出错,请高人指点
来源: 互联网 发布时间:2016-03-10
本文导语: microwindows0.91安装后BIN里的文件能正常运行,但编译它自带的test.c文件出错, 不管是: gcc -o test test.c -I /usr/include/microwin 还是: gcc -o test test.c -I /home/yangwq/microwindows-0.91/src/include/ 都提示信息如下: test.c: In fu...
microwindows0.91安装后BIN里的文件能正常运行,但编译它自带的test.c文件出错,
不管是:
gcc -o test test.c -I /usr/include/microwin
还是:
gcc -o test test.c -I /home/yangwq/microwindows-0.91/src/include/
都提示信息如下:
test.c: In function ‘GsCheckMouseEvent’:
test.c:125: error: ‘COORD’ undeclared (first use in this function)
test.c:125: error: (Each undeclared identifier is reported only once
test.c:125: error: for each function it appears in.)
test.c:125: error: expected ‘;’ before ‘rootx’
test.c:126: error: expected ‘;’ before ‘rooty’
test.c:127: error: ‘BUTTON’ undeclared (first use in this function)
test.c:127: error: expected ‘;’ before ‘newbuttons’
test.c:131: error: ‘rootx’ undeclared (first use in this function)
test.c:131: error: ‘rooty’ undeclared (first use in this function)
test.c:131: error: ‘newbuttons’ undeclared (first use in this function)
test.c: In function ‘GsCheckKeyboardEvent’:
test.c:150: error: ‘MODIFIER’ undeclared (first use in this function)
test.c:150: error: expected ‘;’ before ‘modifiers’
test.c:154: error: ‘modifiers’ undeclared (first use in this function)
*************************************************************************************************
问题就出在这里,‘COORD’、‘MODIFIER’不知是在哪定义的,应该导入哪个库?
test.c是microwin自带的测试程序,不会出错,如果需要看代码,在下面这个官网链接:
http://svn.neurostechnology.com/filedetails.php?repname=Nano-X&path=%2Ftrunk%2Fsrc%2Fdemos%2Ftest%2Ftest.c&rev=4&sc=0
小弟新手接触microwin,还请高人指点。谢谢!
不管是:
gcc -o test test.c -I /usr/include/microwin
还是:
gcc -o test test.c -I /home/yangwq/microwindows-0.91/src/include/
都提示信息如下:
test.c: In function ‘GsCheckMouseEvent’:
test.c:125: error: ‘COORD’ undeclared (first use in this function)
test.c:125: error: (Each undeclared identifier is reported only once
test.c:125: error: for each function it appears in.)
test.c:125: error: expected ‘;’ before ‘rootx’
test.c:126: error: expected ‘;’ before ‘rooty’
test.c:127: error: ‘BUTTON’ undeclared (first use in this function)
test.c:127: error: expected ‘;’ before ‘newbuttons’
test.c:131: error: ‘rootx’ undeclared (first use in this function)
test.c:131: error: ‘rooty’ undeclared (first use in this function)
test.c:131: error: ‘newbuttons’ undeclared (first use in this function)
test.c: In function ‘GsCheckKeyboardEvent’:
test.c:150: error: ‘MODIFIER’ undeclared (first use in this function)
test.c:150: error: expected ‘;’ before ‘modifiers’
test.c:154: error: ‘modifiers’ undeclared (first use in this function)
*************************************************************************************************
问题就出在这里,‘COORD’、‘MODIFIER’不知是在哪定义的,应该导入哪个库?
test.c是microwin自带的测试程序,不会出错,如果需要看代码,在下面这个官网链接:
http://svn.neurostechnology.com/filedetails.php?repname=Nano-X&path=%2Ftrunk%2Fsrc%2Fdemos%2Ftest%2Ftest.c&rev=4&sc=0
小弟新手接触microwin,还请高人指点。谢谢!
|
我用的是qtopia,QCOORD等,用的时候加ld_library_path变量到你的库就可以