Author Topic: How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?  (Read 6034 times)

martinS

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hello,
I want to write GNOME applications at my Zaurus C3200 with weeXpc and pdaXrom from Hermocom.com.
GTK+ is installed and all GNOME libs and includes, too. The package manager says this.  
It is easy to compile GTK+ sources, because "gtk-config" ist installed at the Zaurus.
But, how can I compile a C-source, written for GNOME ?  

Can anyone help me?

Best regards
martinS

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?
« Reply #1 on: June 28, 2008, 12:08:50 pm »
You need the development libs. Get the native-build squashfs, mount it, and you're good to go.

Search the forum for instructions/links (you're looking for zgcc-3.4.6-something). If you can't find anything, I'll post more direct instructions later.

Sorry, I'm a bit rushed now.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

martinS

  • Newbie
  • *
  • Posts: 4
    • View Profile
How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?
« Reply #2 on: June 29, 2008, 03:44:56 am »
Hello Capn_Fish,

thank you very much for your answer.
Do you mean that I have to mount zgcc-3.4.6.squashfs ?
ROX-Filer says that this squashfs-file is already mounted on my Zaurus.
Do I have to mount it in another way?
And , next question, because I am a Linux-newbie: How do I mount such a squashfs-file?
And , next question: How do I compile a GNOME-sourcefile?

martinS

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?
« Reply #3 on: June 29, 2008, 11:05:04 am »
If you have the squashfs mounted correctly, when you type "df" in a terminal, you should see a line like:

Code: [Select]
/dev/loop0 numbershere samenumbershere 0 100% /opt/native/arm/3.4.6-xscale-softvfp
and when you type "gcc" in the terminal, it chould say "gcc: no inout files."

To mount the squashfs, just do a:

Code: [Select]
mkdir -p /opt/native/arm/3.4.6-xscale-softvfp
mount -o loop -t squashfs /path/to/zgcc-3.4.6.img /opt/native/arm/3.4.6-xscale-softvfp

You can get zgcc from http://distro.ibiblio.org/pub/linux/distributions/pdaxrom/

To compile a Gnome app (without a Makefile or anything), you probably need to do something like this  (assuming it's a C file):

Code: [Select]
gcc -o myprogram myprogram.c -lgnome -lgtk
The linker flags may be wrong there, but that's the general idea.

HTH
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

martinS

  • Newbie
  • *
  • Posts: 4
    • View Profile
How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?
« Reply #4 on: June 29, 2008, 02:18:30 pm »
Hello Capn_Fish,
thank you, again.

I did as you advised and tested if the squashfs is mounted correctly on my C3200.
When I type "df" I get: /dev/loop0  26880   26880   0  100%   /opt/native/arm/3.4.6-xscale-softvfp

When I type "gcc" I get: gcc: no input files

Indeed I can compile GTK+ - applications with gcc without any problems.

But when I write a simple GNOME application
(example: gnomewin.c from Arthur Griffith, GNOME/GTK+ Programming Bible, IDG Books, 2000, page 31)
and try to compile it with: gcc -o gnomewin gnomewin.c -lgnome -lgtk

the Linux terminal gives the following messages:

gnomewin.c:4:19: gnome.h: No such file or directory
gnomewin.c: In function ´main´:
gnomewin.c:8: error: ´GtkWidget´undeclared (first use in this function)
.
.
and so on

Therefore I think gcc doesn´t find the gnome libs.
Is that correct?
And would you please help me once more?

Best regards
martinS

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?
« Reply #5 on: June 29, 2008, 02:27:14 pm »
You're not missing the library, you're missing the header.

It may be in an odd location. Look int /usr/include and /opt/native.../include for a gnome.h. If it's not there, you need a gnome-dev package, or just to copy the header of the correct version from the source code.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo