WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: need help to compile the fltk projects  (Read 4209 times)

Offline si_hussain1

  • Newbie
  • *
  • Posts: 44
need help to compile the fltk projects
« on: June 17, 2009, 07:41:21 AM »
Hi Everyone,
  I am new to tinycore linux and i just downloaded and got it working. I made some modifications depending on my requirement w.r.t the task bar, rightclick menu etc.
  I want to customise the cpanel as well. I downloaded the source code. But i am not able to compile the fltk projects. Can someone please give some info regarding this if any one has already compiled it?
   Also, i need tiny linux for one particular hardware. i.e no run time new hardware will be connected. therefore, i need to build its kernel with minimal support. how do i go about it? can someone give me .config file with the existing settings so that i modify it according.

Thanks in advance

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: need help to compile the fltk projects
« Reply #1 on: June 17, 2009, 08:49:35 AM »
   Also, i need tiny linux for one particular hardware. i.e no run time new hardware will be connected. therefore, i need to build its kernel with minimal support. how do i go about it? can someone give me .config file with the existing settings so that i modify it according.

http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/config-2.6.29.1-tinycore

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: need help to compile the fltk projects
« Reply #2 on: June 17, 2009, 10:16:01 AM »
For most of the cxx files use:
g++ -Os -fno-exceptions -fno-rtti -fpic -lfltk -o name name.cxx

Note that what is posted are Fltk Fluid projects and directly changing the cxx is not desirable.
It is more desirable to use the extension fluid so as to easly manipulate the gui elements.
The compiler can be called direcly from within fluid (see shell menu item).
Personally, I typically use a less optimized call g++ -lfltk -o hello hello.cxx 2>&1 && ./hello
while interactively adjusting/creating the gui.
10+ Years Contributing to Linux Open Source Projects.

Offline si_hussain1

  • Newbie
  • *
  • Posts: 44
Re: need help to compile the fltk projects
« Reply #3 on: June 18, 2009, 01:26:00 AM »
Hi,
   Thanks for info. I removed some tabs from the cpanel through fluid and generated the source and tried compiling  but i get the below error. I have installed fluid. i.e make and "make install". If i am missing something. I do not know what. Any suggestions will be greatly appreciated.

g++ -lfltk -o cpanel cpanel.cxx 2>&1 && ./cpanel

/tmp/cc7Ykmc2.o: In function `main':
cpanel.cxx:(.text+0x287): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
cpanel.cxx:(.text+0x329): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
cpanel.cxx:(.text+0x3cb): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
cpanel.cxx:(.text+0x46d): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
cpanel.cxx:(.text+0x50f): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
/tmp/cc7Ykmc2.o:cpanel.cxx:(.text+0x5b1): more undefined references to `Fl_Button::Fl_Button(int, int, int, int, char const*)' follow
/tmp/cc7Ykmc2.o: In function `main':
cpanel.cxx:(.text+0x619): undefined reference to `Fl_Group::end()'
cpanel.cxx:(.text+0x72c): undefined reference to `Fl::run()'
/tmp/cc7Ykmc2.o: In function `Fl_Double_Window::Fl_Double_Window(int, int, char const*)':
cpanel.cxx:(.text._ZN16Fl_Double_WindowC1EiiPKc[Fl_Double_Window::Fl_Double_Window(int, int, char const*)]+0x22): undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
cpanel.cxx:(.text._ZN16Fl_Double_WindowC1EiiPKc[Fl_Double_Window::Fl_Double_Window(int, int, char const*)]+0x27): undefined reference to `vtable for Fl_Double_Window'
/tmp/cc7Ykmc2.o: In function `Fl_Double_Window::show(int, char**)':
cpanel.cxx:(.text._ZN16Fl_Double_Window4showEiPPc[Fl_Double_Window::show(int, char**)]+0x1b): undefined reference to `Fl_Window::show(int, char**)'
collect2: ld returned 1 exit status


Offline si_hussain1

  • Newbie
  • *
  • Posts: 44
Re: need help to compile the fltk projects
« Reply #4 on: June 18, 2009, 01:40:02 AM »
Hi,
  I sorted out the compiling problem. I had not installed the libfltk's. Now i have no problems in compiling. I am curious about one thing. ALthough i removed the button "crond" from the cpanel and build the source using fluid. I still see couple of lines in the .cxx files and .fl file w.r.t to the crond. I had to comment them to continue with the compilation. how do i build a clean new cpanel with only those components that i require?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: need help to compile the fltk projects
« Reply #5 on: June 19, 2009, 12:08:05 AM »
When cpanel is brought up as a fluid project, the last block displayed is the startup code.
This is where I check the status of the daemons in order to set the button initial state.
While using fluid, if you double click the code box, then delete the proper if statement checking crond, then cpanel should build clean.
10+ Years Contributing to Linux Open Source Projects.

Offline si_hussain1

  • Newbie
  • *
  • Posts: 44
Re: need help to compile the fltk projects
« Reply #6 on: June 22, 2009, 02:05:35 AM »
Thanks Roberts,
   Your suggestion did help. I am ready to go.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: need help to compile the fltk projects
« Reply #7 on: June 23, 2009, 01:50:24 PM »
Please use a new thread for a new subject.  Thread split to http://forum.tinycorelinux.net/index.php?topic=2098.0