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] libarchive


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] libarchive
Date: Thu, 10 Jun 2010 18:32:21 +1000

On 10 June 2010 04:46, Natalie Tasman <address@hidden> wrote:
> Volker,
> Here's a small test program for libarchive.  On a native system (OS X 10.6
> using macports) it builds without error, while using my current (dev)
> version of mignw-cross-env I still get errors suggesting the same confusion
> between static and dynamic declarations ("undefined reference to
> `__imp__archive_write_new'", etc) with this small test file.
> build: <gcc> -o libarchive-test.exe libarchive-test.c -I <include path>
> -L<lib path> -larchive

Hi Natalie,

Did you see if you can configure libtpp with --disable-shared?

The simplest link test is probably to remove the --disable-bsdtar
option from libarchive's configure. Then we can look through the log
to see how it builds bsdtar.exe. The -DLIBARCHIVE_STATIC option to gcc
seems to do the trick.

Try compiling the test program with a line like:

i686-pc-mingw32-gcc -o libarchive-test.exe libarchive-test.c \
`i686-pc-mingw32-pkg-config libarchive --cflags --libs` \
-DLIBARCHIVE_STATIC

and you should get no errors, though this doesn't seem ideal.



Hi Volker,

Do you think it's reasonable to build bsdtar.exe as a link test then
write a simple batch file as a runtime test?

Tony



reply via email to

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