Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=4679642
By: apostenet2

Hi,
I have a problem when linking a program which is meant to use readline. I am
disappointed.
I try to compile under winXP with DevCpp 4.9.9.2, so mingw.
I got developpers files containing headers and lib (static and import).
I choosed to use static import. 
So I added to my makefile 
INCS=-Ipath_to_readline/include and
LIB=path_to_readline/lib/libreadline.a path_to_readline/lib/libhistory.a

but in this case, imports are not realized.
I got the following errors : 

xxx.o(.text+0x6e9):xxx.c:451: undefined reference to `_imp__readline'
xxx.o(.text+0x71d):xxx.c:456: undefined reference to `_imp__add_history'

and other errors as characteristics as these.

In looking into realine.h, I saw that without any declaration, preprocessor
was considering that I wanted to use the dll. So I added following to compiler
declaration:
CC=gcc ${READLINE}
READLINE=-DUSE_READLINE_STATIC

After that, errors come from readline and history library imports : 


path_to_readline/lib/libreadline.a(vi_mode.o)(.text+0x3717):vi_mode.c: undefined
reference to `mbrtowc'
path_to_readline/libreadline.a(vi_mode.o)(.text+0x3767):vi_mode.c: undefined
reference to `wcrtomb'
path_to_readline/readline/lib/libreadline.a(complete.o)(.text+0x1f72):complete.c:
undefined reference to `lstat64'
path_to_readline/readline/lib/libreadline.a(complete.o)(.text+0x20bf):complete.c:
undefined reference to `stat64'
...
path_to_readline/readline/lib/libreadline.a(complete.o)(.text+0x3040):complete.c:
undefined reference to `mbrlen'
path_to_readline/readline/lib/libreadline.a(bind.o)(.text+0x3b9a):bind.c: 
undefined
reference to `stat64'
etc

As I looked previously to compile advices, I thought Perhaps I needed to link
against ligw32c, what I done, but it didn't seem to change anything.

Can anyone help me or give me a hint for where to search?
I was already some hours searching on the net for these functions, but found
nothing really consistent.
They seem to be included in glibc under unix systems, what pushes into the 
direction
of libgw32c.
I saw references to msvcrt.dll, so I verified I have it (I was sure, but doubt
is whispering).

thank you in advance.

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=74807

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to