Topic: Linking program with several static lib's and modules
Problem while building main program and linking several libraries
The project of the program under consideration contains three libraries. All used modules are copied to the sub-directory of the main program. Following happens while building the main program:
One library, named “structure_concept.a”, gives no trouble
A second lib, named “ASC12lib.a” contains a procedure which is also used in
“structure_concept.a” but where not recognized. Preliminary I fixed that problem by adding the procedure to a file contained in “structure_concept.a”
A procedure of a third lib, named “edit-sheet-library.a”, is also called from “structure_concept.a”. Building of the main program failed by some error messages “undefined reference to …..” as follows:
=======================================================================
Generating Makefile... Okay
=======================================================================
Generating CASTOR12lt.exe
E:\ASC_prog_files\CASTOR12\StructureConcept\structure_concept.a(dim_edit_sheet.o): In function `dim_edit_sheet_':
E:\ASC_prog_files\CASTOR12\StructureConcept/./dim_edit_sheet.f90:62: undefined reference to `edit_sheet_'
E:\ASC_prog_files\CASTOR12\StructureConcept\structure_concept.a(dim_edit_sheet.o):dim_edit_sheet.f90:(.rdata$.refptr.__edit_sheet_ctr_MOD_exitcode[.refptr.__edit_sheet_ctr_MOD_exitcode]+0x0): undefined reference to `__edit_sheet_ctr_MOD_exitcode'
…..........
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (CASTOR12lt.exe) returned a bad status
Error(E02): Make execution terminated
Failed *
Libraries are only added to the main program, because I suppose linking of all is done while building the main program. All libraries are static. What means “shared” in the option window of the lib's?
All projects are using 64 Bit architecture
In the file option of the main program no reference is made to the libraries and other modules outside the project of the main program.
I also tried to define in "Option, file location, modules" to refer to the original modules of the edit sheet lib
but got no other other result
Please can you give me a hint about linking an project options?
Best Regards Klaus