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] What's missing?


From: Enoch
Subject: Re: [Mingw-cross-env-list] What's missing?
Date: Thu, 11 Oct 2012 04:15:25 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7

Do you know perhaps why the sqlite3.exe (the CLI) is not created?

Thanks, Enoch.

On 10/11/2012 03:17 AM, Mark Brand wrote:
> Enoch wrote:
>> Hi,
>>
>> I have a small program that builds well in Linux but refuses to link
>> against sqlite3 and readline under MXE. I guess that if I turn this
>> program into an autoconf compliant project then autoconf would figure
>> out how to do that, but that's daunting :-)
>>
>> By the way, pointing environment variables LD_LIBRARY_PATH and
>> LIBRARY_PATH to mxe's lib places did not help.
> 
> You shouldn't expect those to help.LD_LIBRARY_PATH is for finding shared
> libraries at run time. As far as I know, LIBRARY_PATH doesn't do anything.
> 
>>
>> Thanks, Enoch.
>>
>> PATH=/home/enoch/mxe/usr/bin:/home/enoch/mxe/usr/i686-pc-mingw32/bin
>> CPATH=/home/enoch/mxe/usr/include:/home/enoch/mxe/usr/i686-pc-mingw32/include
>>
>> i686-pc-mingw32-gcc -Wall -Wextra -g -lreadline -lsqlite3 -o vote.exe
>> vote.c
>> /tmp/ccF65ASU.o: In function `Guard':
>> /home/enoch/Words/winston_management/owners/vote.c:42: undefined
>> reference to `sqlite3_close'
>> /tmp/ccF65ASU.o: In function `main':
>> /home/enoch/Words/winston_management/owners/vote.c:101: undefined
>> reference to `sqlite3_open_v2'
> 
> Libraries defining symbols must come after objects using them. Something
> like this should work, which also takes care of readline's dependency on
> pdcurses:
> 
>     i686-pc-mingw32-gcc -Wall -Wextra -g -o vote.exe vote.c -lsqlite3
> -lreadline -lpdcurses
> 
> Mark
> 
> 
> 





reply via email to

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