Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29230 Обсуждение

Link command ommiting obj files.

Intel_C_Intel
Сотрудник
871Просмотр.

Hi,

One of our machines is refusing to build a project that all others work ok with.

The problem appears to relate to the fact that we include obj files into the project directly. We do this because we have a large number of these supplied to us by a 3rd party and it's easier to see them when added like this than when they are in the additional dependancies list.

On the one machine that fails, the command that the linker recieves ommits these obj files, so the extract from the build log is:

Link /OUT:"Debug/Console1.exe" /INCREMENTAL:NO /NOLOGO /DEBUG /PDB:"Debug/Console1.pdb" /SUBSYSTEM:CONSOLE "Debug/test.obj"
instead of: the below from the working machines.

Link /OUT:"Debug/Console1.exe" /INCREMENTAL:NO /NOLOGO /DEBUG /PDB:"Debug/Console1.pdb" /SUBSYSTEM:CONSOLE "Debug/test.obj" "D:My DocumentsLocalSupportoRMR.obj"

The projects, solutions etc are all identical (got from a common source control). We have tried going through and comparing the settings, but the machine that doesn't work is at a remote office(although same brand, os, etc.) and this makes comparing the settings difficult. Does someone know what is causing this on the machine that fails to build the solution?

I attach a zip file with an example project, I will re-iterate that this works fine on the majority of our machines, it's just one machine it doesn't work on.

Thank you in advance,

Glyn.

0 баллов
8 Ответы
Steven_L_Intel1
Сотрудник
871Просмотр.
That is a real puzzler. What version of Visual Studio is on the system where it doesn't work?
Intel_C_Intel
Сотрудник
871Просмотр.

It's VS 2003.

I believe that it will be version 7.1.3088, as thats what I have installed. I can confirm that tomorrow (the remote office is in Hong Kong) if it is relevant.

It's v9.1.3375.2003 of IVF (although 9.0 does the same).

Thanks

Glyn.

Steven_L_Intel1
Сотрудник
871Просмотр.

I noticed an odd thing in the .vfproj file in that one of the .for files is "excluded from build". This should not affect the .obj file but it is unusual. I tried building the project and of course it worked.

Are you absolutely sure the remote system is using the same .vfproj?

Intel_C_Intel
Сотрудник
871Просмотр.

In this test the person who's machine it doesn't work set up the project I attached (after adding my working buildlog.html). Once he built it the first time he took the .obj file that was created from the .for file that's excluded from the build and added it to the project, then he excluded the .for that to create the test.

If he includes the .for and excludes the obj, then it works fine, but the problem is that we don't have the source files for some routines in our real world program.

I am 100% sure that it's the same vfproj as I sent to you (as he created it to illustrate the problem to me first), it happens on a number of projects that he gets from source control too, which are identical too. He's also doing a full rebuild to ensure that it's not something that it thinks is built when it's not.

Steven_L_Intel1
Сотрудник
871Просмотр.

I wish I had an asnwer for you... It's almost as if VS thinks that the .obj is excluded from the build.

I'd be more comfortable if the project didn't have a source that would generate an object file of the same name. Can he remove the source from the project and thenbuild?

Intel_C_Intel
Сотрудник
871Просмотр.

Yes, that's exactly the symptoms, unfortunately i don't think it's related to that, in our other projects there are no files excluded from the build. I will ask him to check though and get back to you.

I guess that there are no debug settings that we can set up so that we can see what VS is thinking, is the part that creates the link input controlled by MSVS or IVF?

Thanks, Glyn.

Steven_L_Intel1
Сотрудник
871Просмотр.

I don't know of a way to add debug output to how VS decides what to put out there.

I suppose an alternative is, rather than adding the .obj as a source file is to name it in the Linker Additional Dependencies field.

jimdempseyatthecove
Почетный участник III
871Просмотр.

Glyn,

In looking at the Console1.vfproj file, but not knowing the file placements on both systems I have the following comments:

1) RMR.FOR file is in the project file but flagged as Exclude from Build.
RMR.obj file is also included in the project file but not flagged as Exclude from Build.
Perhaps VS is figguring that if it is not going to build the .obj file that it should not link the .obj file (same expected name of buildable .obj file).

You could test for this by removing the RMR.FOR from the project list (as opposed to flagging to exclude from build)

2) In the working machines listing in your post you have
"D:My DocumentsLocalSupportoRMR.obj"
but in the project file you have

The problem site likely doesn't have RMR.obj in the RelativePath.
Note, your working machine is not using RelativePath for RMR as it isn't using "RMR.obj", rather "D:My DocumentsLocalSupportoRMR.obj"
Try having them remove RMR.obj from the project, then Add Existing item and browse for the file.

My suspicion is they copiedRMR.obj to "D:My DocumentsLocalSupporto" but the project folder is not that folder.

Note too, "My Documents"is not a name of a folder. The actual folder name is dependent on the account in which you log in to.
If the file were copied to "D:My DocumentsLocalSupporto" while logged in to one account, then later a compilation is attempted while logged into a different account, then the file will not be found.

Jim Dempsey


Ответить