Coder Social home page Coder Social logo

Library search path about fobis HOT 5 CLOSED

szaghi avatar szaghi commented on July 20, 2024
Library search path

from fobis.

Comments (5)

szaghi avatar szaghi commented on July 20, 2024

from fobis.

szaghi avatar szaghi commented on July 20, 2024

Hi Jacob,

I am trying to implement this feature, but I am failing building a working example (I always link libraries with full path). Can you provide examples of commands for liking with -L(-l)? Both GNU gfotran and Intel ifort seem to support the same syntax. For example, let us assume the following setup:

├── build
│   ├── mod
│   └── obj
│       └── cumbersome.o
├── fobos
├── precompiled
│   ├── mod
│   │   └── nested_1.mod
│   └── obj
│       └── first_dep.o
├── README.md
└── src
    └── cumbersome.f90

Which commad I should use to build without the full path precompiled/obj/first_dep.o?

With both gfortran and ifort I have tried:

ifort build/obj/cumbersome.o -Lprecompiled/obj first_dep.o -o build/Cumbersome

but I have failed

ifort: error #10236: File not found:  'first_dep.o'

from fobis.

jacobwilliams avatar jacobwilliams commented on July 20, 2024

I think it only works for libraries (not .o files). Here's an example (with gfortran...but I think ifort might be the same).

├── build
├── lib
│   └── libblah.a
└── src
    └── cumbersome.f90

To compile, you would use:

gfortran -lblah -L./lib ./src/cumbersome.f90 -o build/Cumbersome

Note that the library is named libblah.a, but you only use -lblah in the call (the compiler puts the lib prefix and .a suffix. This is weird but that's what it does.

from fobis.

szaghi avatar szaghi commented on July 20, 2024

Thanks, I will try it monday.

Have a good weekend.

from fobis.

szaghi avatar szaghi commented on July 20, 2024

Dear Jacob,

your feature should be implemented. I have pushed the new release on both this github repo and PyPi, thus you can install via pip or manually.

I have added some more documentations:

Please, let me know of any bugs you will find.

P.S. Now that FoBiS.py is on PyPi I am testing some nice (IMHO) Travis CI "extensions" for Fortran programs... maybe you will interested on that.

from fobis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.