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

Locally Defined Symbol Imported

Groundsel
初学者
1,358 次查看

I imagine this has come up before in various guises. I would like to get rid of WARNING messages by means other than simply switching them off (too much like shooting the messenger). Our application features a number of dll's some of which make use of a COMMON block within a module. (This was to get around the problem of exporting module EQUIVALENCE variables - we export a COMMON block in stead.) On the other hand the routines within the dll also make use of the exported COMMON block and hence the warning messages "Locally defined symbol xxxxx imported in yyyyy."

Does anyone have a way of getting around this and avoiding the warnings. I have to add that no harm seems to be done so far as I have been able to tell.

Tom

0 项奖励
6 回复数
Steven_L_Intel1
1,358 次查看

The warning is harmless. The only way to get rid of it is to add it to the list of messages to "ignore" in the linker properties. You get this when a DLLIMPORT is seen for a symbol defined in the linked image. That will happen if you DLLEXPORT something in a module and then USE that module.

0 项奖励
Groundsel
初学者
1,358 次查看

Thanks, Steve,

That is what I expected you would say.

Tom

0 项奖励
onkelhotte
新分销商 II
1,358 次查看
Hi Steve,

same problem here... But I do not find that option to turn it off (Im still using IVF 11.0).

Or is it now possible to change the code so that I can use DLLEXPORT without getting the warning messages?

Markus

Edit: When I use these options (/ignore:4049/ignore:4217) inlinker command line, most of the warning messages are gone. But not this one, which has no linker warning number (locally defined symbol imp__PROTEX_mp_USERCHECK imported). Is there a solution for this as well?

[bash]module Protex

type userCheckType
    character*32 :: hash
    character*10 :: name
end type

!   Number of User
type(userCheckType) userCheck(2)
!DEC$ ATTRIBUTES DLLEXPORT :: userCheck

end module Protex

! ***************************************************************************
subroutine initUserCheck()
!DEC$ ATTRIBUTES DLLEXPORT :: initUserCheck

use Protex

implicit none

userCheck(1)%hash = "A1C1BF7ECB23F004CDA690E3D45D11213FFBBCA1"
userCheck(1)%name = "MaxMueller"

userCheck(2)%hash = "906FB69A221B0429D2A86B34E2FA6C1078AB9F06"
userCheck(2)%name = "John Doe"

end subroutine initUserCheck[/bash]
0 项奖励
Steven_L_Intel1
1,358 次查看
Markus,, you did not show me the actual text of the message, but I am guessing that this is coming from the Intel "pre-linker", xilink. This problem was fixed in version 12.0 - as of that version, xilink honors the /ignore switch.
0 项奖励
onkelhotte
新分销商 II
1,358 次查看
This is the actual linker warning:

warning : locally defined symbol __imp__PROTEX_mp_USERCHECK imported


Well switch to XE in January. At the end of the year our company is so poor that we cant afford a new license ;-)

Markus
0 项奖励
Steven_L_Intel1
1,358 次查看
Ok, thanks. The newer compiler will take care of the problem.
0 项奖励
回复