digitalmars.D.learn - lib readline
- =?ISO-8859-1?Q?Lu=EDs_Marques?= (9/9) Mar 05 2007 Hello,
- Mike Johnson (5/19) Mar 05 2007 Just a guess, but I imagine they're using gcc on Windows, maybe mingw.
- tomD (35/49) Mar 05 2007 Try to make a DLL out of the lib, run implib on it and mostly
Hello, I want to use readline, and at the moment my codebase only compiles on windows, so I searched for a windows package of readline and found: http://gnuwin32.sourceforge.net/packages/readline.htm I am unable to link with it though. I have tried to use coffimplib, but it tells me that the readline.lib file is not a supported library. Suggestions, please? Luís
Mar 05 2007
Just a guess, but I imagine they're using gcc on Windows, maybe mingw. You don't want your library and D to use different C runtimes... bad things happen. Best bet is to probably compile readline yourself... Luís Marques wrote:Hello, I want to use readline, and at the moment my codebase only compiles on windows, so I searched for a windows package of readline and found: http://gnuwin32.sourceforge.net/packages/readline.htm I am unable to link with it though. I have tried to use coffimplib, but it tells me that the readline.lib file is not a supported library. Suggestions, please? Luís
Mar 05 2007
Luís Marques Wrote:Hello, I want to use readline, and at the moment my codebase only compiles on windows, so I searched for a windows package of readline and found: http://gnuwin32.sourceforge.net/packages/readline.htm I am unable to link with it though. I have tried to use coffimplib, but it tells me that the readline.lib file is not a supported library. Suggestions, please? LuísTry to make a DLL out of the lib, run implib on it and mostly you are done. Try building libreadline with ./configure --lots-of-switches --enable-shared This should let you end wih the .dll. Otherwise try something like this: GCC=gcc -mno-cygwin cblas.dll: $(LIBCBLAS) mkdir -p obj (cd obj; ar x ../$(LIBCBLAS); \ $(GCC) -shared -o ../cblas.dll *.o \ -Wl,--output-def=../cblas.def \ -Wl,--export-all-symbols \ -Wl,--enable-auto-import \ -Wl,--enable-auto-image-base \ -Wl,--compat-implib \ -Wl,--add-stdcall-alias \ -Wl,--enable-stdcall-fixup \ ) rm -rf obj gsl.dll: $(LIBGSL) cblas.dll mkdir -p obj (cd obj; ar x ../$(LIBGSL); \ $(GCC) -shared -o ../gsl.dll *.o ../cblas.dll \ -Wl,--output-def=../gsl.def \ -Wl,--export-all-symbols \ -Wl,--enable-auto-import \ -Wl,--enable-auto-image-base \ -Wl,--compat-implib \ -Wl,--add-stdcall-alias \ -Wl,--enable-stdcall-fixup \ ) rm -rf obj I did that for gsl-1.9, there was some tweaking required in the build process, otherwise it worked fine. Ciao Tom
Mar 05 2007