OESF Portables Forum
Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Linux Applications => Topic started by: martinS on June 28, 2008, 11:29:38 am
-
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
-
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.
-
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
-
If you have the squashfs mounted correctly, when you type "df" in a terminal, you should see a line like:
/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:
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/ (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):
gcc -o myprogram myprogram.c -lgnome -lgtk
The linker flags may be wrong there, but that's the general idea.
HTH
-
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
-
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.