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

IPB

Welcome Guest ( Log In | Register )

> Simplest way to an executable ?, Compiling a single C file...
fpp
post Jun 24 2004, 03:28 AM
Post #1





Group: Members
Posts: 188
Joined: 1-February 04
Member No.: 1,647



Hi,

How hard would it be to compile a single C file to an executable that runs on the Z ?

This is a console-mode Linux app that has no user interface (sort of a combined Weblog + http server) and uses flat files for storage, no dependencies. It's quite portable as it runs on almost any Linux/unix and Windows too. It is just one C file.

What's the simplest way to try this on the Z ? is a cross-platform tool chain really necessary, or can it be done on the Z itself (a C760) ?

Thanks for any tips ; just in case it matters, below is the list of includes in the source for the Unix/Linux platforms :

#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <locale.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <dirent.h>
#include <errno.h>
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
fpp
post Jun 24 2004, 06:22 AM
Post #2





Group: Members
Posts: 188
Joined: 1-February 04
Member No.: 1,647



QUOTE(Stubear @ Jun 24 2004, 04:59 AM)
You can compile it on the Z if you install zgcc on the Z. Otherwise you will need to install a cross-compielr on your desktop.

The include files you listed seem like standard linux includes and should be no problem

As lardman recommend if you post the link or the file someone can compile it for you

Well, that's what I thought too, but didn't dare ask ;-)

It's actually quite a nice little app, so I don't mind giving it a little advertising here, I'm sure it could have some interesting uses on a Z. Here's the link :

http://midas.psi.ch/elog/

There are several source files but only the big one (elogd.c) is actually needed.

If I get the chance I'll still give zgcc a go, but in the meantime if anyone with the right tools can build the executable, TIA to him/her.
Go to the top of the page
 
+Quote Post

Posts in this topic


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: 22nd May 2013 - 07:42 AM