Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 21, 2002 library search path | ||||
---|---|---|---|---|
| ||||
Hi, I have a problem with extending the lib search path, ie:- -LC:\MyLibs seems to make sc think that I'm specifying a linker that it can't find. I'm very new to DM, so I'm assuming that this is a fundamental oversite on my part. -- Marc. |
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Kealy | Marc Kealy wrote:
> I have a problem with extending the lib search path, ie:-
> -LC:\MyLibs
> seems to make sc think that I'm specifying a linker that it can't find.
Yes, that's what you do.
When you start sc.exe or dmc.exe without paramters it will tell you what -L is
for.
Jan
|
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | In the docs for sc, it says that you can also use '-L' to pass arguments to the linker and gives an example of passing both a switch and a lib search path. If this is not the prefered method, could anybody tell me what is? Thanks -- Marc. "Jan Knepper" wrote > Marc Kealy wrote: > > > I have a problem with extending the lib search path, ie:- > > -LC:\MyLibs > > seems to make sc think that I'm specifying a linker that it can't find. > > Yes, that's what you do. > When you start sc.exe or dmc.exe without paramters it will tell you what -L is > for. > > Jan > > |
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Kealy | That's -L/
with -L you specify the linker (most likely an external one)
with -L/ you specify arguments to the linker.
Marc Kealy wrote:
> In the docs for sc, it says that you can also use '-L' to pass arguments to the linker and gives an example of passing both a switch and a lib search path.
>
> If this is not the prefered method, could anybody tell me what is?
>
> Thanks
>
> --
> Marc.
>
> "Jan Knepper" wrote
> > Marc Kealy wrote:
> >
> > > I have a problem with extending the lib search path, ie:-
> > > -LC:\MyLibs
> > > seems to make sc think that I'm specifying a linker that it can't find.
> >
> > Yes, that's what you do.
> > When you start sc.exe or dmc.exe without paramters it will tell you
> what -L is
> > for.
> >
> > Jan
> >
> >
|
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | Jan, I appreciate you taking the time to answer my questions, but please don't assume that I'm an idiot. Although I'm new to DM, I'm quite familiar with the concepts of using compilers (Borland + GCC). Now, in order to extend the lib search, I can find two options: 1. Use the 'LIB' environment variable. This is a last resort for me. 2. Use -L???. This is what the manual says:- -L/switch Pass /switch to linker. For example, this command: sc test -L/packcode -L\test\prog adds the option /packcode and the library search path \test\prog to the linker's command line. You'll notice that the second argument of this example dosn't use the '/' charactor, but goes straight into a relative path. Now, a relative path is not what I want, I want to use an absolute path. So, what I'd like to know is:- Is there a way to use the '-L' switch to add an absolute path to the lib search? If not; Are there other options than those above? How do you do it? -- Marc. "Jan Knepper" wrote > That's -L/ > with -L you specify the linker (most likely an external one) > with -L/ you specify arguments to the linker. > > > > Marc Kealy wrote: > > > In the docs for sc, it says that you can also use '-L' to pass arguments to > > the linker and gives an example of passing both a switch and a lib search > > path. > > > > If this is not the prefered method, could anybody tell me what is? > > > > Thanks > > > > -- > > Marc. > > > > "Jan Knepper" wrote > > > Marc Kealy wrote: > > > > > > > I have a problem with extending the lib search path, ie:- > > > > -LC:\MyLibs > > > > seems to make sc think that I'm specifying a linker that it can't find. > > > > > > Yes, that's what you do. > > > When you start sc.exe or dmc.exe without paramters it will tell you > > what -L is > > > for. > > > > > > Jan > > > > > > > |
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Kealy | > 1. Use the 'LIB' environment variable. This is a last resort for me. That would work. > 2. Use -L???. This is what the manual says:- > > -L/switch Pass /switch to linker. > For example, this command: > sc test -L/packcode -L\test\prog > adds the option /packcode and the library search path > \test\prog to the linker's command line. What about -L/-Lc:\test\prog ??? Jan |
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Kealy | The library search path is controlled by the LIB environment variable: www.digitalmars.com/ctg/optlink.html#environment "Marc Kealy" <marc@kealy.fslife.co.uk> wrote in message news:ami76c$2ld0$1@digitaldaemon.com... > In the docs for sc, it says that you can also use '-L' to pass arguments to > the linker and gives an example of passing both a switch and a lib search path. > > If this is not the prefered method, could anybody tell me what is? > > Thanks > > -- > Marc. > > "Jan Knepper" wrote > > Marc Kealy wrote: > > > > > I have a problem with extending the lib search path, ie:- > > > -LC:\MyLibs > > > seems to make sc think that I'm specifying a linker that it can't find. > > > > Yes, that's what you do. > > When you start sc.exe or dmc.exe without paramters it will tell you > what -L is > > for. > > > > Jan > > > > > > |
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | "Jan Knepper" <jan@smartsoft.cc> wrote in message news:3D8CB83D.392328AC@smartsoft.cc... > > 1. Use the 'LIB' environment variable. This is a last resort for me. > > That would work. > > > 2. Use -L???. This is what the manual says:- > > > > -L/switch Pass /switch to linker. > > For example, this command: > > sc test -L/packcode -L\test\prog > > adds the option /packcode and the library search path > > \test\prog to the linker's command line. > > What about -L/-Lc:\test\prog ??? > > Jan > > No. I've tried a few different things like that. -- Marc. |
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter,
You should promote the use of sc.ini more often. I like programs that are self-contained and require no registry or environment settings. Especially when I also have MSVC6 on board, which does!
Sc.ini should be the preferred method IMHO.
Mark
>
>The library search path is controlled by the LIB environment variable:
>
> www.digitalmars.com/ctg/optlink.html#environment
>
|
September 21, 2002 Re: library search path | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mark Evans | Yes, you are right. I wish more programs were self-contained. I had to keep after people to keep this working, the install programmers kept wanting to muck with the system directory and registry settings <g>. "Mark Evans" <Mark_member@pathlink.com> wrote in message news:amip9g$udg$1@digitaldaemon.com... > Walter, > > You should promote the use of sc.ini more often. I like programs that are self-contained and require no registry or environment settings. Especially when > I also have MSVC6 on board, which does! > > Sc.ini should be the preferred method IMHO. > > Mark > > > > > >The library search path is controlled by the LIB environment variable: > > > > www.digitalmars.com/ctg/optlink.html#environment > > > > |
Copyright © 1999-2021 by the D Language Foundation