Hi,
I was wondering if there was a way to know the absolute path of the
library "currently running".
For example, in my function foo, how can I get the path of the library
containing the definition of foo?
The library path will be different from the "current directory" (.)
since the current directory will be the directpry of the prgram that
loaded the lib; not the path to the library itself.
Otherwise, do you know fi the STL library provide a "registry service"
(like the java Preferences API)?
Thanks a lot for your help 4 5453 br***********@gmail.com wrote: Hi,
I was wondering if there was a way to know the absolute path of the library "currently running". For example, in my function foo, how can I get the path of the library containing the definition of foo?
The library path will be different from the "current directory" (.) since the current directory will be the directpry of the prgram that loaded the lib; not the path to the library itself.
That's very platform specific, some platforms might not even have
libraries or directories.
Better ask on a group specific to your platform.
Otherwise, do you know fi the STL library provide a "registry service" (like the java Preferences API)?
No.
--
Ian Collins. br***********@gmail.com wrote: I was wondering if there was a way to know the absolute path of the library "currently running".
There can be. However, it would be a feature of the OS, not of the
language.
In C++ what's "running" is the program, not "the library". The host system
_may_ provide the command with which it was started, in the 'argv[0]' (see
the 'main' function), or it may not, it's up to the system. Many systems
do,
yet some don't.
For example, in my function foo, how can I get the path of the library containing the definition of foo?
C++ defines the _language_. In C++ you can find the _translation unit_ in
which the *code* is contained (see __FILE__ macro). The rest is platform-
and implementation-specific (and off-topic here).
The library path will be different from the "current directory" (.) since the current directory will be the directpry of the prgram that loaded the lib; not the path to the library itself.
All those things are unknown to C++.
Otherwise, do you know fi the STL library provide a "registry service" (like the java Preferences API)?
Nothing like that in the Standard.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
> I was wondering if there was a way to know the absolute path of the library "currently running". For example, in my function foo, how can I get the path of the library containing the definition of foo?
on unix : ldd ./a.out (./a.out is the executable )
macosX : oTool ./a.out
regards,
Aman Angrish.
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG br***********@gmail.com wrote: Hi,
I was wondering if there was a way to know the absolute path of the library "currently running". For example, in my function foo, how can I get the path of the library containing the definition of foo?
The library path will be different from the "current directory" (.) since the current directory will be the directpry of the prgram that loaded the lib; not the path to the library itself.
Otherwise, do you know fi the STL library provide a "registry service" (like the java Preferences API)?
Thanks a lot for your help
In unix type the following command :
$ ldd <executable name>
If you want to attach the libraries at the time of running, you have
update the LD_LIBRARY_PATH
Regards,
Thobias Vakayil This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Taurins |
last post by:
Hi there.
I have an included file (header.php) that contanis a reference to a graphic.
If I stay at the root level, then I can control the relative path of the
image.
eg. images/imagename.jpg
...
|
by: dchaffin |
last post by:
I'm having a problem using file_exists with an absolute path and I can
not figure out why.
I tried the exact example that is on www.php.net ...
<?php
$filename = '/path/to/foo.txt';
if...
|
by: Fu Bo Xia |
last post by:
the java.lang.Object.forName method takes a java class name and returns a
Class object associated with that class.
eg. Class myClass = Object.forName("java.lang.String");
by if i only know the...
|
by: Stuart |
last post by:
Hi All,
I got a challenge to make the same APS/Script/Html run on different web
roots. I can not use relative pathing in a lot of cases. We use lots of
included files so depending on where that...
|
by: mhadi |
last post by:
Hi All,
I am developing a solutions for clients to run some webpages. Since
there is no webserver the ASP route is a No Go. So I am using
Javascript to connect to my database.
The Problem is that...
| |
by: Jon Slaughter |
last post by:
do I have to prefix every absolute path with document root to get it to
work?
For some reason I thought that prefixing a path with '/' or './' with make
it absolute w.r.t to document root but I...
|
by: cybervigilante |
last post by:
I can't seem to change the include path on my local winmachine no
matter what I do. It comes up as
includ_path .;C:\php5\pear in phpinfo() but there is no such file. I
installed the WAMP package...
|
by: Maanav Jackson |
last post by:
Hi
I am displaying a third party webpage into a variable using curl
library. When i am displaying the variable in the browser using echo
command as shown below.
echo $pagecopy;
Browser is...
|
by: Nathan Sokalski |
last post by:
I have a page in my site that I need the absolute url of. Is there a
function in .NET to which you can pass a relative url or something such as
"~/mydirectory/mypage.aspx" which will return an...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |