Rebuild 0.1 released
Bradley Smith
user at domain.invalid
Mon Feb 5 22:35:06 PST 2007
Kirk McDonald wrote:
> Bradley Smith wrote:
>>
>> How do I use rebuild to link in libraries?
>>
>> I've tried using -Spath with some.lib and the full path path\some.lib,
>> but the library is never passed through to the link command.
>>
>> Thanks,
>> Bradley
>>
>
> -S is for specifying a /path/, not a file. This is for supporting the
> pragma(link) feature. This is like pragma(lib), except you specify a
> sane part of the library name, and it figures out the actual .lib
> filename. (And it does the Right Thing on Linux, too.)
>
> To explicitly specify a .lib file, use -L.
>
How do you use -L to link in the library?
Here is the DMD command I'm trying to convert to rebuild.
dmd gld.lib ..\gl\opengl32.lib ..\gl\glu32.lib ..\win32\win32.lib
..\win32\gdi32.lib ..\win32\winmm.lib -version=WindowsXP -Isource
-I..\gl\imports -I..\win32\imports -Iimports -oftriangle.exe
-L-L/exet:nt/su:windows:4.0 source\examples\triangle.d
When I simply replace dmd with rebuild -v, it prints the link message
below, which doesn't contain any of the libs.
rebuild -v gld.lib ..\gl\opengl32.lib ..\gl\glu32.lib ..\win32\win32.lib
..\win32\gdi32.lib ..\win32\winmm.lib -version=WindowsXP -Isource
-I..\gl\imports -I..\win32\imports -Iimports -oftriangle.exe
-L-L/exet:nt/su:windows:4.0 source\examples\triangle.d
link dmd .\triangle.obj .\gld.obj .\gld_-internal.obj
.\gld_-win32-platform.obj .\gld_-win32-window.obj .\gld_-enable.obj
.\gld_-win32-fullscreen.obj .\gld_-win32-enable.obj
.\gld_-win32-init.obj .\gld_-win32-time.obj .\gld_-win32-glext.obj
.\gld_-win32-thread.obj .\gld_-win32-joystick.obj .\gld_-glext.obj
.\gld_-image.obj .\gld_-stream.obj .\gld_-window.obj .\gld_-tga.obj
.\gld_-thread.obj -oftriangle.exe -L-L/exet:nt/su:windows:4.0
If I use -L on the first library "gld.lib", it produces an link error
"OPTLINK : Warning 9: Unknown Option : NOIGLD.LIB"
rebuild -v -Lgld.lib ..\gl\opengl32.lib ..\gl\glu32.lib
..\win32\win32.lib ..\win32\gdi32.lib ..\win32\winmm.lib
-version=WindowsXP -Isource -I..\gl\imports -I..\win32\imports -Iimports
-oftriangle.exe -L-L/exet:nt/su:windows:4.0 source\examples\triangle.d
link dmd .\triangle.obj .\gld.obj .\gld_-internal.obj
.\gld_-win32-platform.obj .\gld_-win32-window.obj .\gld_-enable.obj
.\gld_-win32-fullscreen.obj .\gld_-win32-enable.obj
.\gld_-win32-init.obj .\gld_-win32-time.obj .\gld_-win32-glext.obj
.\gld_-win32-thread.obj .\gld_-win32-joystick.obj .\gld_-glext.obj
.\gld_-image.obj .\gld_-stream.obj .\gld_-window.obj .\gld_-tga.obj
.\gld_-thread.obj -oftriangle.exe -Lgld.lib -L-L/exet:nt/su:windows:4.0
Thanks,
Bradley
More information about the Digitalmars-d-announce
mailing list