Results 1 to 1 of 1
I wonder how I can make the C code ,I wrote in linux environment(namely mandrake 9.1), portable for most linux and if possible unix systems. I do have a few ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-18-2004 #1
- Join Date
- Feb 2004
I use C standard libraries I do have on my system. I have 1 source and 1 header file, and in the header file I call these libraries;
curses.h menu.h stdio.h unistd.h types.h stat.h fcntl.h netdb.h termios.h string.h errno.h time.h stdlib.h socket.h in.h inet.h wait.h signal.h math.h Xlib.h..
to compile and generate executable I write this in the command line
gcc blabla.c -o bla -L/usr/X11R6/lib -lX11 -lmenu -lcurses
as its seen above I have to define the library path and this path is not unique...
also there is one more thing ;
In the program I open the serial port by enabling /dev/ttyS0 or /dev/ttyS1 . This is the case on my system but I suppose it may differ from system to system. Especially for unix systems. So I should make this paramater system dependent.
I suppose I need to write configure ,make and install scripts. I dont know how to do it and where to start...