mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] libssh2.a undefined references


From: Mark Brand
Subject: Re: [Mingw-cross-env-list] libssh2.a undefined references
Date: Sun, 27 May 2012 20:22:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120428 Firefox/12.0 SeaMonkey/2.9.1


Jamie Lahowetz wrote:
Im trying to cross compile my program using autotools, a first for me. after running /configure --prefix=/home/deadpickle/hprcc_terminal/test/ --host=i686-pc-mingw32
make

I get the errors:
home/deadpickle/mxe/usr/i686-pc-mingw32/lib/libssh2.a(global.o):global.c:(.text+0x21): undefined reference to `gcry_control' /home/deadpickle/mxe/usr/i686-pc-mingw32/lib/libssh2.a(session.o):session.c:(.text+0x9ed): undefined reference to address@hidden' /home/deadpickle/mxe/usr/i686-pc-mingw32/lib/libssh2.a(session.o):session.c:(.text+0x24ec): undefined reference to address@hidden' /home/deadpickle/mxe/usr/i686-pc-mingw32/lib/libssh2.a(session.o):session.c:(.text+0x25b3): undefined reference to address@hidden'
(Many more)

not sure what they mean so what am i doing wrong?


Hi Jamie,

You have to explicitly link to the libraries that provide these symbols. For some reason, your configure script isn't picking up the dependencies of libssh2. Pkg-config lists them

    i686-pc-mingw32-pkg-config --libs-only-l libssh2

    -lssh2 -lgcrypt -lgpg-error -lws2_32

This often "just works" because good configure scripts make use of pkg-config. You could try to fix your configure, but if you're in a hurry you might just try to help the configure script like this:

    ./configure \
        --prefix=/home/deadpickle/hprcc_terminal/test/ \
        --host=i686-pc-mingw32 \
        LIBS="`i686-pc-mingw32-pkg-config --libs-only-l libssh2`"

Mark




reply via email to

[Prev in Thread] Current Thread [Next in Thread]