www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - lib.exe

reply Selman Ulug <selman.ulug gmail.com> writes:
hi,

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

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

slmn 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 BLACKSATAN ~/test
$ ar cr libtest.lib libtest.obj 

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

slmn 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

regards
-- 
Selman Ulug
Blog: http://sulug.blogpot.com
E-mail: selman.ulug(at)gmail(dot)com
CMakeD: http://www.dsource.org/projects/cmaked
AUR: http://aur.archlinux.org/packages.php?K=selman&SeB=m
Mar 19 2007
next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Selman Ulug wrote:

Just curious, is your blog really at blogpot? Or should it be blogspot?

Cheers!
Mar 19 2007
parent Selman Ulug <selman.ulug gmail.com> writes:
Monday 19 March 2007 15:10 Lars Ivar Igesund wrote:

 Selman Ulug wrote:
 
 Just curious, is your blog really at blogpot? Or should it be blogspot?
 
 Cheers!

thanks you saved me. I writen by mistake it's blogspot :) fixed. regards -- Selman Ulug Blog: http://sulug.blogspot.com CMakeD: http://www.dsource.org/projects/cmaked AUR: http://aur.archlinux.org/packages.php?K=selman&SeB=m
Mar 19 2007
prev sibling parent Selman Ulug <selman.ulug gmail.com> writes:
solved. now CMakeD works near perfect on GNU/Linux with DMD and GDC but
there is some works to do on Windows DOS/MinGW for both compilers. look
http://www.dsource.org/projects/cmaked/wiki/SampleBuildSessions to get an
idea how to works.

cheers
-- 
Selman Ulug
Blog: http://sulug.blogspot.com
CMakeD: http://www.dsource.org/projects/cmaked
AUR: http://aur.archlinux.org/packages.php?K=selman&SeB=m
Mar 20 2007