lua-users home
lua-l archive

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


Hi,

Marcio Barbosa wrote:
> > Did you try not including the postgres module in your project? I believe
> > you only need the ODBC module  (ls_odbc.c). Please clarify what is going
> > wrong with your compilation.

> here it comes, I hope that it's not too obvious :)
> <errors omitted>

It is not *that* obvious, but it's not LuaSQL's fault either. 
You have to correct your include directory settings. Here is my log:

    Y:\tec\luasql\src>bcc32 -eluasql.exe -DWIN32 -It:/lib/lua/new/4.0/include 
        -Ix:/lng/bcc55/include -Lx:/lng/bcc55/lib/psdk 
        -Lt:/lib/lua/new/4.0/lib/bc55 lua.c ls_odbc.c lua.lib lualib.lib 
        odbc32.lib
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    lua.c:
    ls_odbc.c:
    Warning W8004 ls_odbc.c 273: 'handle' is assigned a value that is never 
        used in function get_selfhandle
    Warning W8060 ls_odbc.c 581: Possibly incorrect assignment in function 
        sqlExecute
    Warning W8075 ls_odbc.c 583: Suspicious pointer conversion in function 
        sqlExecute
    Warning W8075 ls_odbc.c 676: Suspicious pointer conversion in function 
        sqlCntTableList
    Warning W8004 ls_odbc.c 676: 'ret' is assigned a value that is never used 
        in function sqlCntTableList
    Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland

    Y:\tec\luasql\src>.\luasql.exe
    Lua 4.0  Copyright (C) 1994-2000 TeCGraf, PUC-Rio
    > s = SQLOpen()
    > c = s:Connect("LuaSQL")
    > t = c:TableList()
    > for i,v in t do print(i,v) end
    1       Essays
    2       Friends

There are some silly warnings that might be removed in the next release.

Regards,
Diego.