[eside-ghost] Compilando con CygWin
Jorge García - Bardok
bardok en gmail.com
Mar Abr 24 11:27:35 CEST 2012
Me voy a ir por la tangente y voy a comentar otra cosa, sorry :P
Si quieres que tire en Windows, sin necesidad de usar Cygwin, ¿has
planteado usar Mingw en lugar de cygwin? Ten en cuenta que lo que
hagas con Cygwin sólo se puede ejecutar con Cygwin, pero lo que hagas
con Mingw se puede usar en otros ordenadores sin necesidad de Mingw...
hace tiempo estuve metido en un proyecto multiplataforma que tiraba de
ffmpeg, y era lo que usábamos.
En este thread hablan de lo mismo que te pasa, y también le
recomiendan intentar tirar con Mingw:
http://cboard.cprogramming.com/c-programming/145288-undefined-reference-clnt_create.html
En este otro le dicen que añada en el makefile la referencia a
"librpc" (igual esto sí puede ayudarte más directamente, ya que no he
visto ninguna referencia a esa librería en tu correo... que conste que
no tengo ni idea de qué quieres hacer, así que igual tampoco te sirve
para nada):
http://forum.xda-developers.com/archive/index.php/t-1042447.html
Un abrazo!
--
Jorge García (aka Bardok)
---
Sending A Message To All
Sending A Message To God
We Must Bring Light To The Darkness
In Time We Will Rise Above
"Ark - Heal The Waters"
2012/4/24 Iker Perez de Albeniz - Txupete - <txupete en gmail.com>:
> 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/
> _______________________________________________
> eside-ghost mailing list
> eside-ghost en listas.deusto.es
> https://listas.deusto.es/mailman/listinfo/eside-ghost
Más información sobre la lista de distribución eside-ghost