Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8657091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:26:12+00:00 2026-06-12T15:26:12+00:00

In order to solve some integrals i downloaded QUADPACK for fortran and compiled all

  • 0

In order to solve some integrals i downloaded QUADPACK for fortran and compiled all the source files in to object files. Now when I want to call subroutines from QUADPACK I need to link them manually or use a makefile/script and this works just fine. However since I am using multiple routines from QUADPACK and for a range of different programs it would make my life alot easier if I could get gfortran to automatically look for the .o files. Say I have a directory where all the .o files are contained I would like to add that as a standard path for gfortran to look for object files. So that I can call a subroutine in my program and just compile it without having to find out witch .o files I need and link them manually.

I understand that the -l flag will solve the problem, but I want to know if there is an easier/lazy way to do it. I was thinking maybe I can make some changes to the compiler and remake it, but that is not really something I want to start to mess with.

I am using Ubuntu by the way. Hope you guys understand my problem and that there is an easy solution.

PS: This is the way I do it now, in order to call one routine.

#!/bin/sh
gfortran -c int.f95
gfortran -o int int.o qagie.o qelg.o qk15i.o qpsrt.o r1mach.o xermsg.o j4save.o
xerprn.o xersve.o xerhlt.o xercnt.o fdump.o xgetua.o i1mach.o
./int

As you can see it it is just a simple shell script to compile and run int.f95

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:26:13+00:00Added an answer on June 12, 2026 at 3:26 pm

    You could create a library and add your object files to it. Then pass that library (i.e., -l) to gfortran when you use gfortran as the linker. It will pull out just the object files that it needs. Later, if you change one source code file that contributed an object file to the library, you can replace just that one in the library. There is plenty of info on the web about how to do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to solve some prolog exercises in order to learn the language
I want json output order by id(child id) Can I solve this problem ?
I have some source code on my Mac, and in order to test I'm
I have a list of objects and want to order them by some property
I have an optimization problem I want to solve. You have some kind of
I've searched high and low in order to solve this problem, but I can't
I'm trying to solve the relational model in order to make a Django app.
Order props: Object selectedItems: Array[1] 0: SelectedItem length: 1 __proto__: Array[0] __proto__: Order I
Order deny,allow deny from all allow from xx.xx.x.xx RewriteRule . - [F] I have
Project Euler I have recently begun to solve some of the Project Euler riddles.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.