Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linking problems

Zuheyr_A_
Beginner
712 Views

Hello,

I am using Visual Fortran V 6.6. I have 2 very similar programs. In only one a subroutine call compiles but fails in the linking with the message

I_SYMBOL@36 not found.

The subroutine call in question is:

CALL I_SYMBOL(IVIS,.4,16.3,.28,title,0.,20)

where title is a string. Could someone please help me with the problem. The call to the same subroutine with similar arguments in the other similar program presents no problem. I am very confused.

Many thanks for reading, Regards

Zuheyr

0 Kudos
5 Replies
Steven_L_Intel1
Employee
712 Views
Is IVIS also a CHARACTER variable in the call that gives you problems? That's the most obvious thing that comes to mind. The compiler thinks that both IVIS and TITLE are CHARACTER, whereas in I_SYMBOL, only one of those is declared as character.
0 Kudos
Zuheyr_A_
Beginner
711 Views

Hello,

Thank you for your help. IVIS is an integer. What I do not understand is the meaning of i_symbol@32 (for instance) is not foumd, although there is a subroutine called i_symbol. Does it mean that the arguments are of different length than the ones declared in the subroutine? How is that number, say 32, calculated?

Many thanks for reading, Regards, Zuheyr

0 Kudos
Steven_L_Intel1
Employee
711 Views
On 32-bit Windows, there are two conventions for calling routines: C and STDCALL. CVF uses STDCALL by default. These differ in how arguments are popped off the stack when a routine returns.

With STDCALL, it is required that the caller and called routine agree on how many arguments are passed. For this reason, the convention is that the routine name is given a suffix of the form @n, where n is the number of bytes pushed on the stack for the argument list. Generally, this is four bytes per argument, because arguments are usually passed by address (in Fortran, anyway). CHARACTER arguments, however, require an extra length argument to be passed. The compiler does this automatically and accounts for it in the @n suffix.

Your call to I_SYMBOL has seven arguments, which would normallt translate to a suffix of @28, but the CHARACTER argument TITLE makes it @32. Your original post said that the name not found had @36, which is why I asked if IVIS was also character, but now you ask about i_symbol@32, so I am unsure what you are really seeing. Adding to my confusion is that you have typed that name in lowercase, which is not typical.

Please post the actual and complete error message text from the build log. Also post the SUBROUTINE or FUNCTION statement for I_SYMBOL and the declarations of all its arguments. Last, please also post the command line options used for compilation.
0 Kudos
Zuheyr_A_
Beginner
712 Views

Dear Steve,

I greatly appreciate your help. thank you. I am just back from work that is why I answer late. I just discovered that if I put an interface block the compiler recognized the declarations and indeed allisok now.

The main program and subroutines were compiled seperately and withoutthe interface blockthe compiler did not understand as strange as it may sound. So if I maygive advice to friends who are beginners likeme, it is better to use the interface blocks...

I greatly appreciate, to reiterate once again, your help. Sincere thanks.

Kind regards,

Zuheyr

PS: I supposeit is not necessary now to putthe listing but mayI ask if it is not possible to havethe responses emailed? Because I cant have access to internet at work. That is whyI made the mistake of @36 or @32 this morning at 6am before Ileftfor work...

0 Kudos
Steven_L_Intel1
Employee
712 Views
There is an option at the top of each thread page to "Enable email subscription". If you want this done for all threads you post in, further up the page, where it says "Signed in as [your name]", there is a link for Preferences. Click that, then click on Email. Here you can select to automatically receive email responses to threads you create or post in.
0 Kudos
Reply