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

Hi,
Now, I tried to link the same program under ms visual cpp 6.0. Don't really
know if this is supported because all developpement advices are related to mingw
gcc (but I thought it was rather more for building readline executables
themselves).
So I done a nmake file.
I use import libraries because only the dll is avalaible in precompiled format
(not the static library for ms vcpp, I thought it was...but  Im am not sure
anymore).
LIBS = readline/lib/readline.lib readline/lib/history.lib
with includes : 
INCS = -Ireadline/include
But I don't manage to make the things compiled.

See errors : 
readline/include\readline/readline.h(356) : error C2375: 'rl_make_bare_keymap'
: redefinition; different linkage
        readline/include\readline/keymaps.h(74) : see declaration
of 'rl_make_bare_keymap'
readline/include\readline/readline.h(357) : error C2375: 'rl_copy_keymap' :
redefinition; different linkage
        readline/include\readline/keymaps.h(77) : see declaration
of 'rl_copy_keymap'
readline/include\readline/readline.h(358) : error C2375: 'rl_make_keymap' :
redefinition; different linkage
        readline/include\readline/keymaps.h(82) : see declaration
of 'rl_make_keymap'
readline/include\readline/readline.h(359) : error C2375: 'rl_discard_keymap'
: redefinition; different linkage
        readline/include\readline/keymaps.h(85) : see declaration
of 'rl_discard_keymap'
readline/include\readline/readline.h(361) : error C2375: 'rl_get_keymap_by_name'
: redefinition; different linkage
        readline/include\readline/keymaps.h(91) : see declaration
of 'rl_get_keymap_by_name'
readline/include\readline/readline.h(363) : error C2375: 'rl_set_keymap'
: redefinition; different linkage
        readline/include\readline/keymaps.h(97) : see declaration
of 'rl_set_keymap'
readline/include\readline/readline.h(364) : error C2375: 'rl_get_keymap'
: redefinition; different linkage
        readline/include\readline/keymaps.h(94) : see declaration
of 'rl_get_keymap'
NMAKE : fatal error U1077: 'cl' : return code '0x2'

I thought these were the import libraries. But I found something strange.
I took the files from the developper file archives.
I saw in readline.h header that not specifying anything was equivalent to 
specifying
USE_READLINE_DLL. That means define links to import libraries with
__declspec(dllimport) (plus extern keyword I was not waiting for...). As it
wasn't working, I tried to specify to use static library :
CC = cl
CFLAGS = $(MACROS) $(INCS) -c
MACROS = -DWIN32 -D_WIN32 -D_WINDOWS -D_WIN32_WINDOWS=0x501 $(READLINE)
READLINE = -DUSE_READLINE_STATIC
Then it worked (but only with 0.5-1, not with 0.5).
Could someone give me some comprehension hints about that?
I would be gratefull


______________________________________________________________________
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

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to