Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Berkely DB > Re: Linking err...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1791 of 1804
Post > Topic >>

Re: Linking error

by Huber Hans <hans.huber@[EMAIL PROTECTED] > Mar 5, 2008 at 10:11 PM

PG schrieb:
> Sorry accidentally posted last response before i finished the post.
> 
> 1. I realized this was a gcc problem so in order to debug the issue, i
> stopped using make. i simply started using the gcc command on command
> line.
> 2. On my machine the following two commands produced the same output
> (error)
>    gcc -L. -lodbc32 -o ODBCTest.exe ODBCTest.o
>  and
>    gcc -L/lib/w32api -lodbc32 -o ODBCTest.exe ODBCTest.o
> gcc was able to find libodbc32.a without specifying -L/lib/w32api.

if -L. works, then either libodbc32.a is in your current directory or 
/lib/w32api is set in ld.so.conf


Cheers Hans
> 
> Thanks Hans
> 
> PG
> 
> On Mar 5, 8:18 am, PG <gosa...@[EMAIL PROTECTED]
> wrote:
>> 1. I realized this was a gcc problem so in order to debug the issue, i
>> stopped using make. i simply started using the gcc command on command
>> line.
>> 2. On my machine the following two commands produced the same output
>> (error)
>>    gcc -L. -lodbc32 -o ODBCTest.exe ODBCTest.o
>>  and
>>    gcc -L/lib/w32api -lodbc32 -o ODBCTest.exe ODBCTest.o
>>
>> On Mar 5, 12:56 am, Huber Hans <hans.hu...@[EMAIL PROTECTED]
> wrote:
>>
>>> PG schrieb:
>>>> I did not know if this was a problem with makefile, cygwin, or the
>>>> specific odbc library, hence i submitted this question to multiple
>>>> groups.
>>>> Anyway, after some more work, found out that the makefile is
resulting
>>>> in this command
>>>> gcc -L/lib/w32api -lodbc32 -o ODBCTest.exe ODBCTest.o <-- Fails with
>>>> link errors.
>>> But that is not what you posted earlier on, see your previously posted
>>> error output:
>>> rm: cannot remove `*.exe': No such file or directory
>>> make: [clean] Error 1 (ignored)
>>> gcc -I/usr/include  -Iinclude   -o ODBCTest.o -c ODBCTest.c
>>> gcc  -L. -lodbc32  -o ODBCTest.exe ODBCTest.o
>>> ODBCTest.o:ODBCTest.c:(.text+0x4a): undefined reference to
>>> `_SQLAllocHandle@[EMAIL PROTECTED]
'
>>> no -L/lib/w32api :-)
>>> And hey, this is has nothing to do with databases, this is a simple
>>> gcc,make problem!
>>> Cheers Hans
>
 




 1 Posts in Topic:
Re: Linking error
Huber Hans <hans.huber  2008-03-05 22:11:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 6:31:03 CDT 2008.