Re: Link: .obj's in Modules.

Skip to first unread message

Darius Markauskas

May 8, 2021, 3:36:56 AM5/8/21
Sorry, but I can't follow your description.
Could you, please, post a short code example (Fortran code, C::B project, C::B workspace you created) which causes the problem?


On Sat, 8 May 2021 at 09:25, <> wrote:
Following Brainerd's book to  make modules independent for re usability.  Example: Two modules were made: A functions module and an general optimized integration module were made as projects in a workspace. They were compile only and successful. The results generate a .mod and .obj in the OBJ directory of the module.

Created project { application}  that "use" the modules in the same directory.  Changed search path  to modules in build options and compiled  successfully. { works well in Win and Linux }

Can't find a away to tell the linker  the .modules .obj location no matter what is tried.  "always says not found"

  Workaround has been to copy the module .obj's to application directory and then use "add files" which end up in the "other"  directory  in the application directory.   Links. During the link process libraries in other directory's are used and works well.

I don't understand that codeblock can find .mod file but can't find obj's file in other directories.

A suggestion for future development in to be able use modules and objects that may be in different workspaces.

Have consider making a library of the module .obj but don't see this an necessary at the
moment, since the library would only have  one  .obj.

Got to figure out how I'm not looking at the process in the right way.

You received this message because you are subscribed to the Google Groups "CBFortran" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages