comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: collect2: ld returned 1 exit status
Date: Thu, 15 Aug 2013 14:27:15 +0200
Date: 2013-08-15T14:27:15+02:00	[thread overview]
Message-ID: <yily31vcxu0$.1dq8hh40os9c8.dlg@40tude.net> (raw)
In-Reply-To: ad25efe2-1bdb-4c29-a109-b2d7c02c1728@googlegroups.com

On Thu, 15 Aug 2013 03:22:59 -0700 (PDT), Dwiki wrote:

> i try to compile a source code using gnade, but it show error 
> 
> c:\gnade\gnu-db-sqlcli.o: In function `gnu__db__sqlcli__sqldatasources':
> c:/gnade/win32-include/gnu-db-sqlcli.adb:496: undefined reference to `_SQLDataSources@40'

Use nm to list entry points of the dll, e.g.

$ nm odbc32.lib

In particular SQLDataSources shows:

00000000 I .idata$4
00000000 I .idata$5
00000000 T .text
00000000 I __imp__SQLDataSources@32
         U __IMPORT_DESCRIPTOR_ODBC32
00000000 T _SQLDataSources@32

> i have add -lodbc32 but the error still there.
> 
> do i missed something?

@N suffix of a decorated name indicates the number of bytes the operation
uses for its arguments (stdcall convention).

Since you have it wrong, that suggests the version of GNADE you are using
deploys wrong types for the arguments of SQLDataSource. Which should not be
very surprising, because as I said before, MS had sufficiently changed the
ODBC API in order to accommodate 64-bit applications, which happened
*after* the last time GNADE was maintained. Possibly, you are compiling for
64-bit instead of 32-bit.

If you are up to revive GNADE ODBC, here is the MS page describing the
changes:

http://support.microsoft.com/kb/298678

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2013-08-15 12:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 10:22 collect2: ld returned 1 exit status Dwiki
2013-08-15 12:27 ` Dmitry A. Kazakov [this message]
2013-08-16  2:38   ` Dwiki
2013-08-16  6:55     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox