Rebuild 0.1 released
Bradley Smith
user at domain.invalid
Tue Feb 6 05:53:00 PST 2007
Gregor Richards wrote:
> Bradley Smith wrote:
>> Bradley Smith wrote:
>>
>>> Gregor Richards wrote:
>>>
>>>> Rebuild is a recreation of build/bud. I'm not a politician, so I'm
>>>> not going into why I wrote it.
>>>>
>>>> It's based on the original DMD frontend, so it's in C++. Binaries
>>>> are available for GNU/Linux and Windows. It should work on nearly
>>>> any system that has a D compiler.
>>>>
>>>> URL: http://www.dsource.org/projects/dsss/wiki/Rebuild
>>>>
>>>> - Gregor Richards
>>>
>>>
>>> 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
>>>
>>
>> Is something missing from the rebuild-0.1.zip? In mars.c, the lib
>> files appear to be put in global.params.libfiles, but I can't find
>> anywhere that the information in global.params.libfiles is used.
>>
>> Thanks,
>> Bradley
>
> That's just leftover from DMD. Getting libs linked in just involves
> passing them into the linker. For every library, you need to add
> -L<library_name> .
>
> I'm going to add a better flag for that.
>
> - Gregor Richards
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
I would recommend making it work as similar as DMD as possible. With
DMD, I just list the libraries along with the source and object files.
Thanks,
Bradley
More information about the Digitalmars-d-announce
mailing list