lib.exe with Makefiles

Selman Ulug selman.ulug at gmail.com
Sun Mar 18 18:15:43 PDT 2007


hi,

I'm working a project to use CMake with D. There is a problem creating static libraries. If I use digitalmars's "lib.exe" on msys:

slmn at BLACKSATAN ~/test
$ dmd.exe -c libtest.d 

slmn at BLACKSATAN ~/test
$ lib.exe -c libtest.lib libtest.obj 
GetFileData: SetFilePointer

same things happens when using CMake created Unix Makefile by gnu make on dos and msys.

F:\MinGW\home\slmn\test>cmake . -G "Unix Makefiles"
-- Check for working D compiler: F:/dmd/bin/dmd.exe
-- Check for working D compiler: F:/dmd/bin/dmd.exe -- works
-- Configuring done
-- Generating done
-- Build files have been written to: F:/MinGW/home/slmn/test

F:\MinGW\home\slmn\test>make
Scanning dependencies of target libtest
[ 50%] Building D object CMakeFiles/libtest.dir/libtest.obj
Linking D static library libtest.lib
GetFileData: SetFilePointermake[2]: *** [libtest.lib] Error 1
make[1]: *** [CMakeFiles/libtest.dir/all] Error 2
make: *** [all] Error 2

is there any idea because not working gnu binutils "ar" on dmd created object files. 

$ dmd.exe -c libtest.d 

slmn at BLACKSATAN ~/test
$ ar cr libtest.lib libtest.obj 

slmn at BLACKSATAN ~/test
$ ar s libtest.lib libtest.obj 

slmn at BLACKSATAN ~/test
$ dmd.exe test.d -L+libtest.lib
f:\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi+libtest.lib;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
   
libtest.lib
 Error 43: Not a Valid Library File 
--- errorlevel 1

CMakeD: http://www.dsource.org/projects/cmaked

regards

-- 
Selman Ulug
Blog: http://sulug.blogpot.com
E-mail: selman.ulug(at)gmail(dot)com
Aur : http://aur.archlinux.org/packages.php?K=selman&SeB=m



More information about the Digitalmars-d-announce mailing list