[eside-ghost] Compilando con CygWin

Iker Perez de Albeniz - Txupete - txupete en gmail.com
Mar Abr 24 09:47:52 CEST 2012


Aupi,

Estoy compilando unas librerías que me tiran bien en linux pero quiero
que funcione en windows.. he instalado cygwin y estoy compilando pero
me da este error:

$ make
g++ -shared -I/usr/include/tirpc -L/usr/lib/tirpc -c libvxi11.cpp -o libvxi11.o
g++ -shared -I/usr/include/tirpc -L/usr/lib/tirpc -c vxi11_user.cc -o
vxi11_user.o
cc -shared -I/usr/include/tirpc   -c -o vxi11_clnt.o vxi11_clnt.c
cc -shared -I/usr/include/tirpc   -c -o vxi11_xdr.o vxi11_xdr.c
g++ -shared -I/usr/include/tirpc -L/usr/lib/tirpc -o libvisa.dll
libvxi11.o vxi11_user.o vxi11_clnt.o vxi11_xdr.o
vxi11_user.o:vxi11_user.cc:(.text+0x79e): undefined reference to `_clnt_create'
vxi11_user.o:vxi11_user.cc:(.text+0x7b9): undefined reference to
`_clnt_pcreateerror'
vxi11_user.o:vxi11_user.cc:(.text+0x859): undefined reference to `_clnt_perror'
vxi11_user.o:vxi11_user.cc:(.text+0x8f7): undefined reference to `_clnt_perror'
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld:
vxi11_user.o: bad reloc address 0x1c in section `.eh_frame'
collect2: ld devolvió el estado de salida 1
Makefile:14: recipe for target `libvisa.dll' failed
make: *** [libvisa.dll] Error 1



las funciones clnt_create, clnt_perror.. estan en rpc/clnt.h y al
compilar el  vxi11_user.cc no me ha dado errores. En linux funciona
todo ok..a es cosa de Cygwin o que estoy haciendo algo mal??

El makefile es este:

VERSION=1.08

#CFLAGS = -Wall -g
CFLAGS = -shared -I/usr/include/tirpc
LIBS = -L/usr/lib/tirpc
INSTALL = install
prefix = /usr/local
CXX = g++

.PHONY : install clean dist distclean

libvisa.dll: libvxi11.o vxi11_user.o vxi11_clnt.o vxi11_xdr.o
	$(CXX) $(CFLAGS) $(LIBS) -o $@ $^

libvxi11.o: libvxi11.cpp libvxi11.hpp vxi11_user.cc vxi11.h
	$(CXX) $(CFLAGS) $(LIBS) -c $< -o $@

vxi11_user.o: vxi11_user.cc vxi11.h
	$(CXX) $(CFLAGS) $(LIBS) -c $< -o $@

vxi11.h vxi11_clnt.c vxi11_xdr.c : vxi11.x
	rpcgen -M vxi11.x

TAGS: $(wildcard *.c) $(wildcard *.h) $(wildcard *.cc)
	etags $^

clean:
	rm -f *.o vxi11_cmd vxi11.h vxi11_svc.c vxi11_xdr.c vxi11_clnt.c TAGS

install: vxi11_cmd
	$(INSTALL) vxi11_cmd $(DESTDIR)$(prefix)/bin/

dist : distclean
	mkdir vxi11-$(VERSION)
	cp -p vxi11_cmd.cc vxi11_user.cc vxi11_user.h vxi11.x vxi11-$(VERSION)/
	cp -p Makefile CHANGELOG.txt README.txt
GNU_General_Public_License.txt vxi11-$(VERSION)/
	tar -zcf vxi11-$(VERSION).tar.gz vxi11-$(VERSION)

distclean :
	rm -rf vxi11-$(VERSION)
	rm -f vxi11-$(VERSION).tar.gz



-- 
Iker Perez de Albeniz
web: http://www.ikeralbeniz.net/


Más información sobre la lista de distribución eside-ghost