How to get the path where the library is installed

How to get the path where the library is installed

Content Index :

How to get the path where the library is installed
Tag : development , By : platformNomad
Date : December 05 2020, 12:23 PM

it should still fix some issue I am working in Linux and I have a library written in Fortran 90 (written by 3rd party), that is reading from a file in the current working directory. I would like to be able to call the resulting library from other folders, hence I need to read the path where the library is installed. How can I know the path to the compiled library within the Fortran code? , If you wish you can fix the path at compile time. Something like
gfortran -cpp mylib.f90 -DPREFIX=\"/usr/local/\"

CALL get_environment_variable("MYLIB_PATH", mylib_path, status=stat)
mkdir $HOME/.config/mylib/
echo "/usr/local/mylib" > $HOME/.config/mylib/path
if (stat/=0) then
  CALL get_environment_variable("HOME", home_dir)
  open(newunit=path_unit, file=home_dir//'/.config/mylib/path',status='old',action='read',iostat=stat)
  if (stat/=0) complain

  read(path_unit,'(a)',iostat=stat)  mylib_path
  if (stat/=0) complain
end if

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

How to check if openssl or cryptopp is installed and use the library that actually exists in the system (is installed)?

Tag : c , By : Scott Everts
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , It's not quite that simple. In order to find that a macro is defined, you have to include the header that defines that macro. And C doesn't have anything like "include foo.h iff it exists"; it has to exist otherwise there is a compilation error.
Normally this would be sorted out by a script that you run before compilation. Your script checks locations like /usr/include, /usr/local/include, etc., to see if the OpenSSL headers are there; and then it outputs a Makefile which contains in the CFLAGS -DHAVE_OPENSSL. Then your code can check for that macro.

installed gcc include path doesn't seem correct and library and header mismatch reported

Tag : c , By : zac
Date : March 29 2020, 07:55 AM
should help you out To compile a kernel module, you are supposed to write a Makefile to setup the kernel path and other environment variable.
You can use the below Makefile to build you kernel module
obj-m := hello_world.o

    make -C /lib/modules/$(shell uname -r)/build  M=$(PWD) modules

    make -C /lib/modules/$(shell uname -r)/build  M=$(PWD) clean

How can I change the library path of an executable after it has been built/installed?

Tag : cmake , By : orlandoferrer
Date : March 29 2020, 07:55 AM
around this issue For find a library at runtime, ldd uses (among other things) RPATH directories, embedded into the executable.
By default, when build the executable/library, CMake adds to RPATH directories, where linked libraries are located.

how to set path for pandas library in /apps for Python installed in /opt in linux redhat

Tag : python , By : Johannes
Date : March 29 2020, 07:55 AM
wish help you to fix your issue First of all, the Python 2.x version won't be active for long. So build your system in Python 3.x versions.
You need to extract the .tar.gz file and then install. You can use tar -xzf .tar.gz
yum install python3-pandas

How to install npm for node.js installed with homebrew installed at custom path?

Tag : macos , By : user130518
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • Recommended Fonts for Programming?
  • Automating VMWare or VirtualPC
  • How do I use more than one OpenID?
  • Domain Specific Language resources
  • Vista or XP for Dev Machine
  • Where can I get the Windows Workflow "wca.exe" application?
  • How to learn ADO.NET
  • What is a good barebones CMS or framework?
  • What's the Developer Express equivalent of System.Windows.Forms.LinkButton?
  • Is it acceptable for invalid XHTML?
  • Anyone soloing using fogbugz?
  • Using MBUnit in TeamCity
  • How to setup a crontab to execute at specific time
  • Linking two Office documents
  • How can I detect if a browser is blocking a popup?
  • Apply filter to t-foreach
  • Lotus Notes convert formula to agent
  • Problem with configuration of odoo for working with pycharm
  • Unexpected number of arguments when calling EM_JS function
  • What does the function state_fidelity() do in Qiskit?
  • Azure function with IoT Hub trigger get send device
  • Cluster similar words using word2vec
  • Add elements into an array then find distinct,
  • Angular8 - error TS2304: Cannot find name
  • Manually polling streams in future implementation
  • How do you perform receipt validation for Android on Xamarin Forms
  • What is the rule behind instruction count in Intel PIN?
  • How to draw some text when click a button in wxWidgets?
  • Restrict entity types in Spacy NER
  • How to animate CN1 Slider progress on load
  • Issue with bwa mem process not running on all output files from previous process
  • Delete videos from playlist using YouTube API
  • How to restart the Hyperledger Composer Playground locally
  • How to configure email alerts in Zabbix Server?
  • Simulator is not working for smart home action with all configured session
  • How parse data using join on Objection.js
  • Assign an array to a property in a Chapel Class
  • Netlogo: How can I obtain the accumulate value in Netlogo?
  • How to populate datasource for listview using api response in react native?
  • Why does gmail API when using history.list method send message ids without the field what action has been preformed on t
  • How to run an append query in ms access vba as part of a transaction
  • Wrong dates shown in Jekyll-based blog
  • How to concatenate two document lists in a webMethods flow service?
  • How to properly set up a site map addition in a customization project
  • IBM Content Collector error calling external Web Service
  • Is (0*1*)* equal to (0 | 1)*?
  • How do I configure phpMyAdmin to start with a blank sql query from the SQL tab?
  • "Objects are not valid as a React child" Redux error when conditionally connecting a component?
  • Displacy results are not showing
  • Strapi / Graphql. What am i doing wrong?
  • How to add Search bar for django template?
  • lookup in presto using single column against a range in lookup table
  • How can you stop videos being stolen on website?
  • Can't code substitution happen in Hybrid Flow?
  • Removed widget remains on parent
  • setup saga middleware with redux-starter-kit's configureStore()
  • How to get cookies from response of scrapy splash
  • I need to do a firebase stream and not a Http Get
  • Unable to compile node-runtime
  • SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com