Operating System - OpenVMS
1755984 Members
4397 Online
108839 Solutions
New Discussion юеВ

The external identifier name exceeds 31 characters.

 
Vengence123
New Member

The external identifier name exceeds 31 characters.

Hi All,

I am trying to compile a code in which I am getting the following compilation error.

%CC-W-LONGEXTERN, The external identifier name exceeds 31 characters

Actually the identifier is defined as:

extern PHPAPI zend_class_entry *spl_ce_RecursiveIteratorIterator;

I don't want to use a macro.
Is there any way out of it??
9 REPLIES 9
Joseph Huber_1
Honored Contributor

Re: The external identifier name exceeds 31 characters.

How is PHPAPI defined ?
http://www.mpp.mpg.de/~huber
Steven Schweda
Honored Contributor

Re: The external identifier name exceeds 31 characters.

> I don't want to use a macro.

Any reason?

> Is there any way out of it??

As usual, many things are possible.

HELP CC /WARNINGS

Look for "DISABLE". Also (as suggested
there):

HELP CC Language_topics Preprocessor #pragma

Look for "message" and "disable".


HELP CC /NAMES

Look for "SHORTENED".
Steven Schweda
Honored Contributor

Re: The external identifier name exceeds 31 characters.

And of course, a better problem report would
include output from:

CC /VERSION

And a short test case which anyone could run
is always a nice touch.
Vengence123
New Member

Re: The external identifier name exceeds 31 characters.

I have have found a solution to this question as seen in the comments below.
Joseph Huber_1
Honored Contributor

Re: The external identifier name exceeds 31 characters.

In fact Your question can have 2 meanings:
First, how to avoid the warnings: Steven showed the possibilities using compiler options or pragmas.

Second, how to avoid the underlying problem:
The limit of 31 characters is imposed by the VMS object file/library module format, and is fixed. (Don't know if this limit is still on IA64 with its different object format).
So in a project involving different source areas and libraries in my opinion one should avoid long names, unless all component/library compilation can be forced to use the same /NAMES options.
http://www.mpp.mpg.de/~huber
Steven Schweda
Honored Contributor

Re: The external identifier name exceeds 31 characters.

> I have have found a solution [...]

Future readers might wish to know what that
solution was.

> [...] as seen in the comments below.

Below what?
H.Becker
Honored Contributor

Re: The external identifier name exceeds 31 characters.

>>> The limit of 31 characters is imposed by the VMS object file/library module format, and is fixed. (Don't know if this limit is still on IA64 with its different object format).

On Integrity the limit is 1024, imposed by the implementation of Librarian. But I don't know whether any compiler makes use of it.
WW304289
Frequent Advisor

Re: The external identifier name exceeds 31 characters.

You can compile with /names=(as_is, shortened) but callers must also be compiled this way, otherwise you'll get Linker's undef.

Thanks,
-Boris
John Reagan
Respected Contributor

Re: The external identifier name exceeds 31 characters.

The limit on Alpha is 64 if I recall correctly. The limit on I64 is larger as Hartmut mentioned.

The Pascal compiler uses longer names in the form "module-name.symbol-name" for static symbols in environment files.