OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How To Compile Gnome Application On Zaurus C3200 With Pdaxrom?
martinS
post Jun 28 2008, 07:29 AM
Post #1





Group: Members
Posts: 4
Joined: 23-May 08
Member No.: 21,820



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. smile.gif
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 ? sad.gif

Can anyone help me?

Best regards
martinS
Go to the top of the page
 
+Quote Post
Capn_Fish
post Jun 28 2008, 08:08 AM
Post #2





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



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.
Go to the top of the page
 
+Quote Post
martinS
post Jun 28 2008, 11:44 PM
Post #3





Group: Members
Posts: 4
Joined: 23-May 08
Member No.: 21,820



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
Go to the top of the page
 
+Quote Post
Capn_Fish
post Jun 29 2008, 07:05 AM
Post #4





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



If you have the squashfs mounted correctly, when you type "df" in a terminal, you should see a line like:

CODE
/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
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
gcc -o myprogram myprogram.c -lgnome -lgtk


The linker flags may be wrong there, but that's the general idea.

HTH
Go to the top of the page
 
+Quote Post
martinS
post Jun 29 2008, 10:18 AM
Post #5





Group: Members
Posts: 4
Joined: 23-May 08
Member No.: 21,820



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
Go to the top of the page
 
+Quote Post
Capn_Fish
post Jun 29 2008, 10:27 AM
Post #6





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th December 2014 - 11:25 PM