Git Product home page Git Product logo

Comments (10)

zerothi avatar zerothi commented on May 26, 2024

I have never tried on windows, but would be happy to ensure it works on Win.

Are you using WSL, or pure Win?

The general cmake procedure would be:

cmake -Bbuild_dir -S.
cmake --build build_dir

or something similar.

I have no experience with coupling a CMake project into a VS Code?

from fdict.

PhilliposK avatar PhilliposK commented on May 26, 2024

Thank you for the ultrafast reply. I'm on a pure Win system. Should I generate my own CMakeLists.txt file before using the following lines?

cmake -Bbuild_dir -S
cmake --build build_dir

from fdict.

zerothi avatar zerothi commented on May 26, 2024

no, cmake should be part of this directory, so checkout the repo, then issue the above commands. (remember the . in front of S

from fdict.

PhilliposK avatar PhilliposK commented on May 26, 2024

(Typo) So, would I be correct in stating that I should

1.) download and extract the fdict library to my project,
2.) run
cmake -Bbuild_dir -S.
cmake --build build_dir

with no other changes?

Thanks again!

from fdict.

zerothi avatar zerothi commented on May 26, 2024

well, ideally you should just install the library somewhere, how do you otherwise add dependencies in your VS Code project?

But the above will compile fdict in and you should find a libfdict.dll in your build_dir directory.
If you want to install it somewhere, you should specify so with -DCMAKE_INSTALL_PREFIX

from fdict.

PhilliposK avatar PhilliposK commented on May 26, 2024

I'll have another look into this. After installation, you mentioned linking via:

FDICT_PATH = /path/to/fdict/parent
FDICT_LIBS = -L$(FDICT_PATH) -lfdict
FDICT_INC = -I$(FDICT_PATH)

Would this be written in the main Fortran file?

from fdict.

zerothi avatar zerothi commented on May 26, 2024

No, this is how to link against external dependencies. Have you ever tried to link another library into an executable? :-D

from fdict.

PhilliposK avatar PhilliposK commented on May 26, 2024

This may be the first time I've had to do this.

from fdict.

zerothi avatar zerothi commented on May 26, 2024

Ok, you should definitely read up on how to link libraries/depedencies against a small project.

I would advice you to play around with this on a smaller scale before going into dependencies as you are doing now.
I would highly suggest you to ask around your local department for members who knows about this stuff.

Here is a minimal description of libraries and how to link them (works the same for fortran).
https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_C_libraries.html

from fdict.

PhilliposK avatar PhilliposK commented on May 26, 2024

Thanks for all the help zerothi!

from fdict.

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.