nanogui: linking query


Previous by date: 22 Jun 2001 14:35:30 -0000 Re: KDGKMODE: Invalid argument, Jordan Crouse
Next by date: 22 Jun 2001 14:35:30 -0000 FLTK chinese support and GTK+??, se_nz
Previous in thread: 22 Jun 2001 14:35:30 -0000 linking query, swati kamat
Next in thread:

Subject: Re: [nanogui] linking query
From: Jordan Crouse ####@####.####
Date: 22 Jun 2001 14:35:30 -0000
Message-Id: <01062208325901.06026@cosmic>

Ok.  If you want to integrate the two modules, I would suggest first 
compiling each module into an object file, and then linking them all together 
in one step:

gcc -c -I<includes here> gui.c
gcc -c -I<includes here> file.c

gcc -static -o myprog gui.o file.o -lm -L<microwindows> -lmwin -lmwinlib 
-lmwin -lmwengine -lmwdrivers -lmwfonts -lmwimages -L/usr/X11R6/lib -lX11 
-L/usr/local/lib/sane -lsane -ljpeg

If you do it in a makefile, then you can do something like:

MWLIBS=-L<mirowindows>/lib -lmwin -lmwinlib -lmwin -lmwengine -lmwdrivers 
-lmwfonts -lmwimages -L/usr/X11R6/lib -lX11

SANELIBS=-L/usr/local/lib/sane -lsane -ljpeg

myprog: file.o gui.o
	$(CC) -o myprog file.o gui.o -lm $(MWLIBS) $(SANELIBS)

file.o: file.c
	$(CC) -o file.o -c file.c

gui.o: gui.c
	($CC) -o gui.o -c gui.c

Jordan

	
On Friday 22 June 2001 07:31, swati kamat mentioned:
> hello,
>
> i have developed a gui for scanning with SANE using microwindows.
> i compile the microwindows code and link it using
>
> gcc -DX11=1 file.o -L/usr/X11R6/lib -lX11 -lmwin -lmwinlib -lmwin
> -lmwengine -lmwdrivers -lmwfonts -lmwimages -lm
>
> now i want link the microwindows code to SANE module for it to support
> scanning.we compile the scanner code using:
>
> gcc -c -I . file.c
> gcc -static file.o -L/user/local/lib/sane -lsane-pnm -ljpeg
>
> how to link the two libraries so as to integrate the 2 modules
>
> thanks
> swati
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Previous by date: 22 Jun 2001 14:35:30 -0000 Re: KDGKMODE: Invalid argument, Jordan Crouse
Next by date: 22 Jun 2001 14:35:30 -0000 FLTK chinese support and GTK+??, se_nz
Previous in thread: 22 Jun 2001 14:35:30 -0000 linking query, swati kamat
Next in thread:


Powered by ezmlm-browse 0.20.