2009-01-29 14:29:06     Cross compiling FLTK

Document created by Aaronwu Employee on Aug 11, 2013
Version 1Show Document
  • View in full screen mode

2009-01-29 14:29:06     Cross compiling FLTK

Samuel Coelho (BRAZIL)

Message: 68532   

 

I'm using "BF527 Ez-kit Lite" and uClinux-dist-2008R1.5-RC3.

 

I followed the documentantion and was able to compile a simple program, like a Hello World. But when compiling a more sofisticated program, with microwindows gui, a face the following error:

 

This command compiles ok.

$ g++ shadow.cpp `fltk-config --ldflags --cxxflags` -o shadow2

 

Whether the bfin compiler not:

$ bfin-uclinux-g++ shadow.cpp `fltk-config --ldflags --cxxflags` -o shadow2

shadow.cpp:2:19: error: FL/Fl.H: Arquivo ou diretório inexistente

shadow.cpp:3:33: error: FL/Fl_Double_Window.H: Arquivo ou diretório inexistente

shadow.cpp:4:23: error: FL/Fl_Box.H: Arquivo ou diretório inexistente

shadow.cpp:5:24: error: FL/fl_draw.H: Arquivo ou diretório inexistente

shadow.cpp:12: error: expected class-name before '{' token

shadow.cpp: In member function 'void DropShadowBox::draw()':

shadow.cpp:15: error: 'Fl_Box' has not been declared

shadow.cpp:16: error: 'label' was not declared in this scope

shadow.cpp:18: error: 'labelfont' was not declared in this scope

shadow.cpp:18: error: 'labelsize' was not declared in this scope

shadow.cpp:18: error: 'fl_font' was not declared in this scope

shadow.cpp:19: error: 'x' was not declared in this scope

shadow.cpp:19: error: 'Fl' has not been declared

shadow.cpp:19: error: 'box' was not declared in this scope

shadow.cpp:20: error: 'y' was not declared in this scope

shadow.cpp:20: error: 'Fl' has not been declared

shadow.cpp:22: error: 'color' was not declared in this scope

shadow.cpp:23: error: 'labelcolor' was not declared in this scope

shadow.cpp:24: error: 'fl_color_average' was not declared in this scope

shadow.cpp:24: error: 'fl_color' was not declared in this scope

shadow.cpp:25: error: 'w' was not declared in this scope

shadow.cpp:25: error: 'h' was not declared in this scope

shadow.cpp:25: error: 'align' was not declared in this scope

shadow.cpp:25: error: 'fl_draw' was not declared in this scope

shadow.cpp: In constructor 'DropShadowBox::DropShadowBox(int, int, int, int, const char*)':

shadow.cpp:30: error: class 'DropShadowBox' does not have any field named 'Fl_Box'

shadow.cpp: In function 'void Update_CB(void*)':

shadow.cpp:41: error: 'class DropShadowBox' has no member named 'label'

shadow.cpp:42: error: 'Fl' has not been declared

shadow.cpp: In function 'int main()':

shadow.cpp:46: error: 'Fl_Double_Window' was not declared in this scope

shadow.cpp:46: error: 'win' was not declared in this scope

shadow.cpp:46: error: expected type-specifier before 'Fl_Double_Window'

shadow.cpp:46: error: expected `;' before 'Fl_Double_Window'

shadow.cpp:48: error: 'class DropShadowBox' has no member named 'labelsize'

shadow.cpp:50: error: 'Fl' has not been declared

shadow.cpp:53: error: 'Fl' has not been declared

 

What should i do to compile this example for the bfin?

How should i link this library?

 

Thanks a lot...

QuoteReplyEditDelete

 

 

2009-01-29 14:34:05     Re: Cross compiling FLTK

Mike Frysinger (UNITED STATES)

Message: 68534   

 

fltk-config is going to be the native fltk build ... it isnt going to work when cross-compiling.  you'll have to cross-compile fltk yourself and then add the -I/-L paths yourself to the build step.

QuoteReplyEditDelete

 

 

2009-02-06 06:26:13     Re: Cross compiling FLTK

Samuel Coelho (BRAZIL)

Message: 68987   

 

Hi Mike.

 

Cross compiling with FLTK worked. I had to use the script "FLTK-config" of the uClinux tree.

I used:

 

$ bfin-linux-uclibc-g++ MyApp_frm.cpp $(/home/scoelho/uClinux-dist-2008R1.5-RC3/user/microwin/nxlib/fltk-1.1.8rc3/fltk-config --ldflags --cxxflags) -o MyApp_frm

 

Regards, Samuel.

Attachments

    Outcomes