Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
July 29, 2003 Creating library files | ||||
---|---|---|---|---|
| ||||
Sorry couldnt find any info on how to do this, How do i create a library file for linking with D programs ? Charles |
July 29, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Sanders |
Charles Sanders wrote:
>
> Sorry couldnt find any info on how to do this, How do i create a library file for linking with D programs ?
I think you can use any standard library utility.
But I like Burtons digc for its simplicity, e. g.
c:\dmd\bin\digc -Ic:\dmd\src\phobos -Ic:\d -lib=venus *.d
No need to maintain a makefile on adding modules...
--
Helmut Leitner leitner@hls.via.at Graz, Austria www.hls-software.com
|
July 29, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Sanders | Charles Sanders wrote:
> Sorry couldnt find any info on how to do this, How do i create a library
> file for linking with D programs ?
digc allows this if you add "-lib=name" to the command-line. Its process is:
- Search code for import statements and include and expand libraries as necessary.
- Execute "dmd -c FILES"
- Execute "lib -p32 -c LIBRARY_NAME OBJECT_FILES"
- Append import information to the library file. I can look up the formats involved with this if you're planning on incorporating digc functionality into DIDE.
- If -install is provided in the command-line, move the file to the dmd/lib directory.
If you're building a dll, it's more involved, although you just need to add "-shared" to the digc command-line. It involves scanning object files for export symbols and generating def files.
|
July 29, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | Ok great I'll use digc for creating libraries, in fact I'm thinking I'll use it for every compilation option is alright that I bundle dig with dide ? > - Append import information to the library file. I can look up the formats involved with this if you're planning on incorporating digc functionality into DIDE. Yea I'd like to make a library and dll project option. Charles "Burton Radons" <loth@users.sourceforge.net> wrote in message news:bg507a$qbp$1@digitaldaemon.com... > Charles Sanders wrote: > > Sorry couldnt find any info on how to do this, How do i create a library file for linking with D programs ? > > digc allows this if you add "-lib=name" to the command-line. Its process is: > > - Search code for import statements and include and expand libraries as > necessary. > - Execute "dmd -c FILES" > - Execute "lib -p32 -c LIBRARY_NAME OBJECT_FILES" > - Append import information to the library file. I can look up the > formats involved with this if you're planning on incorporating digc > functionality into DIDE. > - If -install is provided in the command-line, move the file to the > dmd/lib directory. > > If you're building a dll, it's more involved, although you just need to add "-shared" to the digc command-line. It involves scanning object files for export symbols and generating def files. > |
July 29, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Sanders | Charles Sanders: >Sorry couldnt find any info on how to do this, How do i create a library file for linking with D programs ? In Windows type: lib -c a.lib b.obj c.obj d.obj ... to create a library dmd a.d b.obj c.lib ... to use it See http://www.digitalmars.com/ctg/lib.html for documentation and more examples. |
July 29, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Sanders | Charles Sanders wrote:
> Ok great I'll use digc for creating libraries, in fact I'm thinking I'll use
> it for every compilation option is alright that I bundle dig with dide ?
It's public domain; you can do whatever you want with it. I am explicitly fine with it, yeah.
|
July 30, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | Hmm Im having a little trouble creating a library file, given the file foo.d : class Foo { this() {} } digc -lib=foo foo.d Im getting : Error: file 'foo.lib' not found I am also having trouble creating libraries with straight lib.exe which I just realized, does it depenend on some envrionmental variables or something (lib.exe i mean) ? , sc.ini looks correct. Charles "Burton Radons" <loth@users.sourceforge.net> wrote in message news:bg507a$qbp$1@digitaldaemon.com... > Charles Sanders wrote: > > Sorry couldnt find any info on how to do this, How do i create a library file for linking with D programs ? > > digc allows this if you add "-lib=name" to the command-line. Its process is: > > - Search code for import statements and include and expand libraries as > necessary. > - Execute "dmd -c FILES" > - Execute "lib -p32 -c LIBRARY_NAME OBJECT_FILES" > - Append import information to the library file. I can look up the > formats involved with this if you're planning on incorporating digc > functionality into DIDE. > - If -install is provided in the command-line, move the file to the > dmd/lib directory. > > If you're building a dll, it's more involved, although you just need to add "-shared" to the digc command-line. It involves scanning object files for export symbols and generating def files. > |
July 30, 2003 Re: Creating library files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Sanders | Hmm i re-downloaded DM and it works fine. Charles "Charles Sanders" <sanders-consulting@comcast.net> wrote in message news:bg7p8m$f5c$1@digitaldaemon.com... > Hmm Im having a little trouble creating a library file, given the file > > foo.d : class Foo { this() {} } > > digc -lib=foo foo.d > > Im getting : > > Error: file 'foo.lib' not found > > I am also having trouble creating libraries with straight lib.exe which I just realized, does it depenend on some envrionmental variables or something > (lib.exe i mean) ? , sc.ini looks correct. > > Charles > > "Burton Radons" <loth@users.sourceforge.net> wrote in message news:bg507a$qbp$1@digitaldaemon.com... > > Charles Sanders wrote: > > > Sorry couldnt find any info on how to do this, How do i create a library > > > file for linking with D programs ? > > > > digc allows this if you add "-lib=name" to the command-line. Its process is: > > > > - Search code for import statements and include and expand libraries as > > necessary. > > - Execute "dmd -c FILES" > > - Execute "lib -p32 -c LIBRARY_NAME OBJECT_FILES" > > - Append import information to the library file. I can look up the > > formats involved with this if you're planning on incorporating digc > > functionality into DIDE. > > - If -install is provided in the command-line, move the file to the > > dmd/lib directory. > > > > If you're building a dll, it's more involved, although you just need to add "-shared" to the digc command-line. It involves scanning object files for export symbols and generating def files. > > > > |
Copyright © 1999-2021 by the D Language Foundation