Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

suppress linker warnings

tsimm3
New Contributor I
3,809 Views
I'm getting close to 700 linker warnings about locally defined symbol being imported. I realize I can ignore those warnings but is there a way to suppress them? Earlier versions allowed /ignore:4049, but it doesn't seem to have any effect in version 11. It really increases the build time.
0 Kudos
14 Replies
Steven_L_Intel1
Employee
3,809 Views
Are you building from the command line? If so, precede /ignore with /link and put it at the end of the ifort command. If you are building from Visual Studio, specify this in the Linker property pages.
0 Kudos
tsimm3
New Contributor I
3,809 Views
Hello Steve

I am building from Visual Studio. My linker command line is

/OUT:"Release/corsim.dll" /INCREMENTAL /NOLOGO /MANIFEST:NO /SUBSYSTEM:WINDOWS /IMPLIB:"Release/corsim.lib" /DLL CORWin.lib TxDInterface.lib

and Additional Options line is

/machine:I386 /ignore:4049 /ignore:4217

When I changed that to

/machine:I386 /link /ignore:4049 /ignore:4217

I get this

LINK : warning LNK4044: unrecognized option '/link'; ignored

and I also get 688 warnings about local symbols being imported.

Can you see what I'm doing wrong?

Thanks,
Tom

0 Kudos
Steven_L_Intel1
Employee
3,809 Views
Yes. /link is an "ifort" command line option only. The /ignore options should have worked by themselves. Can you attach a buildlog.htm showing the warnings?
0 Kudos
tsimm3
New Contributor I
3,809 Views
Here's the buildlog.
0 Kudos
Steven_L_Intel1
Employee
3,809 Views
Thanks - I see what is going on now. It is the Intel "pre-linker" xilink that is giving the warning, not the MS linker, when you use /ignore. I need to find out what is going on there and will let you know.
0 Kudos
Steven_L_Intel1
Employee
3,809 Views
I have escalated this to development as issue DPD200153151. It astonishes me that this behavior has been there for many years - at least back to 10.1. I would have expected to see complaints about it before...

If I learn of a way to disable the warnings, I wil let you know. The /ignore:4217 is working - it disables the MS linker's diagnostic - bit xilink is not honoring that. Without the /ignore you'd get two warnings for each imported symbol!
0 Kudos
tsimm3
New Contributor I
3,809 Views
Thanks. I recently jumped from 9-something to 11.1, and it's one of the first things I noticed. I appreciate your quick responses.
0 Kudos
Steven_L_Intel1
Employee
3,809 Views
In version 12, xilink/xilib honors the request to disable specific diagnostics.
0 Kudos
martymike
Novice
3,809 Views
When we first started using IVF we used IVF 9.1 with Visual Studio 2005. We specified /ignore:4049 /ignore:4217 under additional options on the Linker Property Page and everything was fine.

Later we moved to IVF 10.1 and also VS 2008 at the same time. We started getting the linker warnings again. But Microsoft bloggers had been very vocal about saying that the /ignore feature was going to be removed, and, in fact, I saw some responses to questions about that on their forum saying that that was what had happened. So, grumbling mightly about the nearly 2000 of these message were dealing witn (1875 in one example I'm looking at right now), we thought we knew what what going on.

Now I read this, above, where you say that the /ignore should work in IVF 12. Well I'm right in the middle of converting our IVF 10.1/VS 2008 projects to IVF 12.0/VS 2010. Interestingly, you are correct - I am not seeing any LNK4049 or LNK4217 messages (we never took out the options - I thought I was just being obstinate). However we are getting 3996 messages of the form ipo: warning #11073. Can we do something about that?

Example:
4>ipo: warning #11073: C:\LocalDocs\dev\psse\psse_next\build2010\pssengdll\..\pssengfort\Release\pssbouncef.obj: locally defined symbol __imp__APICRITERIA_mp_GETDATACHANGEDFLAG@0 imported
0 Kudos
Steven_L_Intel1
Employee
3,809 Views
You should be able to use the compiler option /diag-disable:11073
0 Kudos
martymike
Novice
3,809 Views
That got rid of half of them; hadn't mentioned before but it seemed like they were all coming out twice. So that's an improvement.

It might have something to do with the fact that the link step - which is when all the messages appear - does not do any compilation. It just links together static libraries created by other projects in the solution (it is a mixed language solution). The result is a dll, if that matters.
0 Kudos
Steven_L_Intel1
Employee
3,809 Views
If you are seeing the messages with the message number, they are coming from "xilink", the Intel prelinker that is always run at the link step. There's a way to get xilink to see that option - will have to find out tomorrow what it is.
0 Kudos
Steven_L_Intel1
Employee
3,809 Views
From my experiments, adding /Qdiag-disable:11073 to the linker Command Line > Additional Options field takes care of this.
0 Kudos
martymike
Novice
3,809 Views
Yes! That did it! Many thanks.
0 Kudos
Reply