[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] [SPAM?] problem with linking (undefined
From:       Michel Brabants <michel.brabants () euphonynet ! be>
Date:       2007-09-23 18:41:05
Message-ID: 200709232041.11111.michel.brabants () euphonynet ! be
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hello,

nevermind. Found the problem. Very stupid ... The extension ended in .lib. 
Should have been .a. Didn't know that it has to be .a. Now I know ... It 
would be nice if the compilersaid to me that it couldn't find the library. 
Instea dit  says undefined references. Or, is there something else going on 
here? If it is that it can't find the library, well it seems to report a 
clear library-not-found-error if the nam eis really wrong (the 
non-extension-part). It would also be nice that it says "library not found" 
when it can't find the specific file (including extension). Just a 
thought ...

Thank you for thi snice comiler, ... anyway. Greetings,

Michel

Op Sunday 23 September 2007, schreef Michel Brabants:
> Hello,
>
> I'm porting an application from linux to windows and am trying tu use lingw
> to ease the porting. The program links with the mysql-dynamic-libraries.
> However, I'm getting undefined references while linking, while those
> symbols seem to be present in the library. The calls in the mysql-dyncamic
> library (created with Visual studio) seem to be STDCALLS. I followed
> instructions (pexports, ...) on how to convert it to a "mingw"-library.
>
> This is some of the output that I'm getting (this is some older output, but
> it show what my poblem is):
>
>  container.o: In function
> `container_db_init':/home/michel/development/vidio-tracker/win32-port/commo
>n/container.c:109: undefined reference to `_mysql_query@8'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:112:
>
> undefined reference to `_mysql_store_result@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:114:
>
> undefined reference to `_mysql_num_rows@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:117:
>
> undefined reference to `_mysql_fetch_row@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:150:
>
> undefined reference to `_mysql_free_result@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:159:
>
> undefined reference to `_mysql_error@4'
>  container.o: In function
> `container_db_reload':/home/michel/development/vidio-tracker/win32-port/com
>mon/container.c:206: undefined reference to `_mysql_query@8'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:209:
>
> undefined reference to `_mysql_store_result@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:211:
>
> undefined reference to `_mysql_num_rows@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:214:
>
> undefined reference to `_mysql_fetch_row@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:247:
>
> undefined reference to `_mysql_free_result@4'
>
>  :/home/michel/development/vidio-tracker/win32-port/common/container.c:252:
>
> undefined reference to `_mysql_error@4'
>
>  The nm-output (I added some _mysql_xxx-functions to the DEF-file, but that
> didn't seem necessary. It seems that dlltool adds a '_' in front
> automatically.):
>
>  i586-mingw32msvc-nm ../mysql/lib/debug/libmysql.lib | grep -i
> _mysql_error@4 00000000 I __imp__mysql_error@4
>  00000000 T _mysql_error@4
>  00000000 I __imp___mysql_error@4
>  00000000 T __mysql_error@4
>
>  I'm using mingw 3.4.5.
>
> Thank you and greetings,
>
>  Michel



["signature.asc" (application/pgp-signature)]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic