[Issue 6605] Add switch to enable setting library search paths via command line

2018-02-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6605

Diederik  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=18506

--


[Issue 6605] Add switch to enable setting library search paths via command line

2018-02-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6605

Diederik  changed:

   What|Removed |Added

 CC||dkgr...@talon.nl

--


[Issue 6605] Add switch to enable setting library search paths via command line

2015-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6605

Andrei Alexandrescu  changed:

   What|Removed |Added

  Component|Optlink |tools

--


[Issue 6605] Add switch to enable setting library search paths via command line

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #8 from Andrej Mitrovic  2011-09-08 
07:40:28 PDT ---
(In reply to comment #7)
> If you create a library you usually don't add another library to it.

You are right, this completely slipped my mind. :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #7 from Rainer Schuetze  2011-09-07 23:44:09 
PDT ---
When building a library, it is generated by dmd, not by the linker. I guess
there is no library search going on at all.

If you create a library you usually don't add another library to it. Insterad,
it is added in the link of the final executable. You can combine libraries with
dmd, but I think this is a very explicite step, so not using a search path
seems ok.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #6 from Andrej Mitrovic  2011-09-07 
15:50:32 PDT ---
Well crap, this syntax doesn't work if you use the -lib switch with DMD. Is
there any workaround for this?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #5 from Andrej Mitrovic  2011-09-05 
14:43:06 PDT ---
FWIW I've updated the dwiki:
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD#section5

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #4 from Andrej Mitrovic  2011-09-05 
14:31:25 PDT ---
(In reply to comment #3)
> Sorry, I did not think of the /NOI. We need a separator from the option, so
> this line works for me:
> 
> dmd main.d -I..\..\src mylib.lib -L+..\..\
> 

Holy cow that actually works!

This has to be specified somewhere in the docs, maybe even the DMD switch docs
because it's so useful with multiple static libraries. Thanks for the tip,
Rainer!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #3 from Rainer Schuetze  2011-09-05 14:25:28 
PDT ---
Sorry, I did not think of the /NOI. We need a separator from the option, so
this line works for me:

dmd main.d -I..\..\src mylib.lib -L+..\..\

Regarding the LIB environment variable: I tend to use a name specific to dmd
(DMDLIB) because LIB is also used by other compilers, but the libraries in
their directories are not OMF and cause optlink to fail.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605



--- Comment #2 from Andrej Mitrovic  2011-09-05 
12:25:14 PDT ---
(In reply to comment #1)
> Actually, you can do that with the rather obscure notation
> 
> dmd main.d -I..\..\src mylib.lib -L..\..\

No, you can't. That's what I was saying. Look:

.\fold1\fold2\main.d
.\foo.d


.\fold1\fold2\main.d:
import foo; 
void main() { auto x = foothing(); }

.\foo.d:
int foothing() { return 1; }

$ dmd -lib foo.d
$ cd fold1\fold2
$ md main.d -I..\..\ foo.lib -L..\..\

OPTLINK : Warning 9: Unknown Option : NOI..\..\
foo.lib
 Warning 2: File Not Found foo.lib
main.obj(main)

The LIB environment variable would be very useful if the default sc.ini didn't
overwrite it but prepend it by default. Instead of this line:

LIB="%@P%\..\lib";\dm\lib

we would have this line:
LIB="%@P%\..\lib";\dm\lib;%LIB%

Then I could actually use LIB via a shell script without having to touch
sc.ini, e.g. continuing my previous example and with the sc.ini change I could
do:

$ set LIB=..\..\;%LIB%
$ dmd main.d -I..\..\ foo.lib

And voila, it works. But unfortunately the default sc.ini setting overwrites
LIB instead of prepending to it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6605] Add switch to enable setting library search paths via command line

2011-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605


Rainer Schuetze  changed:

   What|Removed |Added

 CC||r.sagita...@gmx.de


--- Comment #1 from Rainer Schuetze  2011-09-05 10:40:41 
PDT ---
Actually, you can do that with the rather obscure notation

dmd main.d -I..\..\src mylib.lib -L..\..\

The important part is the trailing backslash for the path that tells optlink
that this is a search path.

Unfortunately, this does not work if you also pass resource or definition files
to the link process, because the link options are always passed at the end of
the optlink command line. The search path then ends up in the wrong section of
the command line.

So, I'd also like an option to pass the library search path to the linker
through dmd in a sensible way. 

BTW: The way to work with library paths in Visual D is to add some environment
variable in the LIB statement of dmds global sc.ini file and use this to extend
the library search path.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---