BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I specify a .dl location?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Steve
Guest





PostPosted: Mon Mar 21, 2005 3:36 pm    Post subject: How do I specify a .dl location? Reply with quote




I am trying to figure out how to creat and use a library in C++Builder. I am able to build a library. I am also able to call functions in the library.

However I can only do so if the .dll is in the same directory as the .exe that is calling the library functions. How do I tell the .exe to look for the .dll over in my library project directory?

So fare I have.....

I specify the .lib directory for the .exe project in tools/Environmental Options/library and also in Project/Options/Directories&Conditionals.

I specify the .lib file for the .exe in Project Manager.

Thanks, Steve
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Mar 21, 2005 4:38 pm    Post subject: Re: How do I specify a .dl location? Reply with quote




"Steve" <steven.r.bridges (AT) navy (DOT) mil> wrote


Quote:
However I can only do so if the .dll is in the same directory as
the .exe that is calling the library functions. How do I tell the .exe
to look for the .dll over in my library project directory?

The OS looks in the calling environment search path when looking for DLLs.
That includes the current directory, the OS's system folder, etc. If you
want to specify a specific folder that is not on the search path, then you
cannot link to the DLL statically at compile time. You will have to load
the DLL dynamically at run time. Then you can specific any path you want.

Quote:
I specify the .lib directory for the .exe project in tools/Environmental
Options/library and also in Project/Options/Directories&Conditionals.

Those settings only effect the compiler and linker. They have no effect on
the final executable at run time.


Gambit



Back to top
Arnie
Guest





PostPosted: Tue Mar 22, 2005 3:40 pm    Post subject: Re: How do I specify a .dl location? Reply with quote



"Steve" <steven.r.bridges (AT) navy (DOT) mil> wrote

Quote:

I am trying to figure out how to creat and use a library in
C++Builder. I am able to build a library. I am also able to
call functions in the library.

However I can only do so if the .dll is in the same directory
as the .exe that is calling the library functions. How do I
tell the .exe to look for the .dll over in my library project
directory?

So fare I have.....

I specify the .lib directory for the .exe project in
tools/Environmental Options/library and also in
Project/Options/Directories&Conditionals.

I specify the .lib file for the .exe in Project Manager.

Thanks, Steve

Specify the path to the DLL in the PATH environment variable.

- Arnie



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.