View previous topic :: View next topic |
Author |
Message |
AKS
Joined: 19 Mar 2008 Posts: 29
|
Posted: Wed Jun 24, 2020 8:36 pm Post subject: Problems with linking- shared directory vs local directory |
|
|
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? |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1898
|
Posted: Thu Jun 25, 2020 12:52 am Post subject: |
|
|
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. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8062 Location: Salford, UK
|
Posted: Thu Jun 25, 2020 7:58 am Post subject: |
|
|
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. |
|
Back to top |
|
|
AKS
Joined: 19 Mar 2008 Posts: 29
|
Posted: Wed Jul 01, 2020 9:15 pm Post subject: BuildLog |
|
|
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? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8062 Location: Salford, UK
|
Posted: Thu Jul 02, 2020 7:56 am Post subject: |
|
|
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. |
|
Back to top |
|
|
AKS
Joined: 19 Mar 2008 Posts: 29
|
Posted: Thu Jul 02, 2020 4:05 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8062 Location: Salford, UK
|
Posted: Thu Jul 02, 2020 7:13 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|