Problems running hello example

閲覧: 56 回
最初の未読メッセージにスキップ

bogdanul2003

未読、
2015/03/14 23:02:142015/03/14
To: fltkg...@googlegroups.com
Hi,

I've compiled fltk to run woth nanox and nxlib on a openwrt router. When I try to run the hello example I get this error :

oot@OpenWrt:/tmp# ./hello 
XSetLocaleModifiers called
XSetErrorHandler called
nxlib: display bpp 16, bits_per_rgb 6
XOpenIM called
XOpenIM() failed
nxTranslateEventMask no handler for event mask (00400000): 22 
XGetDefault Text background
XGetDefault fltk foreground
XGetDefault fltk background
XGetDefault Text selectBackground
XGetDefault fltk dndTextOps
XGetDefault fltk tooltips
XGetDefault fltk visibleFocus
XGetDefault fltk scheme
nxTranslateEventMask no handler for event mask (0062c07f): 14 22 
./hello: can't resolve symbol 'toupper'

Any solutions ?

Ian MacArthur

未読、
2015/03/15 18:00:122015/03/15
To: fltkg...@googlegroups.com
Not as such: there’s a tech note on the nano/nxlib subject here

http://www.fltk.org/articles.php?L1352

But the issue you flag seems different to that.

Since toupper is a standard C library function, I’d guess you just are not linking in the right libs, or have the wrong header files in your path or something.

Are you static linking fltk? Or are you linking dynamically to shared objects?
FWIW, I’d advocate static linking, at least until you know what works and what doesn’t!




bogdanul2003

未読、
2015/03/18 17:10:002015/03/18
To: fltkg...@googlegroups.com
I'm linking dynamically.

I did some digging around and I found the line that gives the error. It's in the libfltk library not in the helloworld application. The file where the error happens is ./src/Fl_x.cxx at this line:  buffer[len + 1] = toupper(buffer[len + 1]);

I followed the article you posted and I modified the makeinclude and fltk-config and I attached the files so maybe you can take a look
I also set my PATH to /home/boil/Documents/opewrt/openwrt/bin/ar71xx/NewFolder/OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.9-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_uClibc-0.9.33.2/bin/
And  STAGING_DIR=/home/boil/Documents/opewrt/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/

Is STAGING_DIR environment variable required?
fltk-config.zip

bogdanul2003

未読、
2015/03/20 17:22:282015/03/20
To: fltkg...@googlegroups.com
Problem solved, I was not compiling with the correct headers.
Thank you
全員に返信
投稿者に返信
転送
新着メール 0 件