Silverfrost Forums

Welcome to our forums

Problems with linking- shared directory vs local directory

24 Jun 2020 7:36 #25783

I'm testing some software and in order to not interfere with the live files, I've created a copy of the directory onto my local desktop. I create a new project in the directory, rebuild dependencies, and Build. The compiling works but I get this error when it tries to link:

Muiltiple definition of symbol: Areas C:\Users\___\SHCP\CheckMate\Win32\Areas.obj, P:\Fortran-Backup\SHCP-SLINK\SHCP_Plato\Areas.obj

C:\Users\___\SHCP\CheckMate\Win32\Areas_MDU.obj, P:\Fortran-Backup\SHCP-SLINK\SHCP_Plato\Areas_MDU.obj

How do I get around this?

24 Jun 2020 11:52 #25786

You have either unintentionally merged two projects or added more files to an existing project. Some of the source files are on C: and others on P:. File names as well as subprogram names are duplicated within a single project, as the linker messages show.

Either fix the project by pruning away the duplicate files, or delete the project files and recreate the project from scratch.

25 Jun 2020 6:58 #25788

There is a file called BuildLog in the local folder that tells you what the IDE has done for you in the build process. You might be able to use this to see where the multiple objects are coming from - maybe a duplicated reference.

1 Jul 2020 8:15 #25882

It looks like there are no object files being created. In my BuildLog I'm getting a bunch of lines that look something like this:

FTN95.EXE 'C:\Users\aks\Desktop\SHCP\YVALU.for' /NO_BANNER /VS7 /DELETE_OBJ_ON_ERROR /ERROR_NUMBERS /UNLIMITED_ERRORS /TABS 4 /CHECKMATE /FPP /CFPP /BINARY 'CheckMate\Win32\YVALU.obj'

How would I fix this?

2 Jul 2020 6:56 #25885

The buildlog does not always include information about the linking process. Linker information is usually in a file called link.lst.

To have a clear report of what happens then delete these two files before doing a build.

2 Jul 2020 3:05 #25888

The link list file shows files that look like:

C:\Users\aks\Desktop\SHCP\CheckMate\Win32\YVALU.obj

But none of these files exist

Edit: I should also say the last line of BuildLog says

slink.exe -OUT: 'CheckMate\Win32\Test.exe' @'C:\Users\aks\Desktop\SHCP\link.lst

2 Jul 2020 6:13 #25889

AKS

Your statement that none of these files exists is not consistent with your first post where the linker reports multiple definitions.

I recommend to that you start at a more elementary level. Create a simple program base on one file and run that first. Then create a very simple project with just two files and so on.

Please login to reply.