- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to build some libraries of a project named SUNDIALs. I was able to do that under Linux, but with VS2019 and oneAPI under WIN10 I couldn't:
- I used cmake to generate the project;
- I opened the projects with VS and tried to build it;
- "C" libraries were built successfully;
- FORTRAN libraries weren't build because the projects don't create the object FORTRAN files just "C" object files (the project uses "C" compiler but also has FORTRAN files in it to be used as object files on FORTRAN library projects);
- some projects must create wrappers to be used under FORTRAN;
thanks in advance
Pedro R.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The way you do this in Visual Studio is to have two static library projects in one solution, one Fortran and one C. Use Build Dependencies > Project Dependencies to make the C project a "dependent" of the Fortran project. In the Fortran project's properties, set property Librarian > General > Link Library Dependencies to Yes.
What will happen is that the C and Fortran code will be built separately, and then the C library modules will be inserted automatically into the Fortran library, giving you a combined library.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page