Operating System - HP-UX
1752788 Members
5990 Online
108789 Solutions
New Discussion юеВ

Re: Compiler error 2513_D & 2393

 
SOLVED
Go to solution
George Peplow_2
Occasional Contributor

Compiler error 2513_D & 2393

Trying to port a "c" module from HPUX 11 PARISC to HPUX11.32 ITANIUM.

Receiving compiler error:

"inflib.c", line 226: warning #2513-D: a value of type "int" cannot be
assigned to an entity of type "struct tm *"
tptr = localtime (&timeval);

THEN many:

"inflib.c", line 240: error #2393: pointer to incomplete class type is not
allowed
srcDir, fileName, dstDir, fileName, localExt, tptr->tm_year,
^

I've attached the source file.

2 REPLIES 2
Dennis Handly
Acclaimed Contributor
Solution

Re: Compiler errors 2513 & 2393

>line 226: warning #2513-D: a value of type "int" cannot be assigned to an entity of type "struct tm *"
tptr = localtime (&timeval);

This means there is no prototype in scope for localtime(3). Which is strange since you include time.h.

line 240: error #2393: pointer to incomplete class type is not allowed
srcDir, fileName, dstDir, fileName, localExt, tptr->tm_year,

This means that you don't have a definition of tptr (struct tm) in scope, again problems with .

I don't have these problems. You can compile with -H to see which time.h you are including.

>I've attached the source file.

This is near useless since you forgot QwTypes.h & crefp.h. Creating a .i file with "-E -.i" would enable anyone to see what you were compiling.

George Peplow_2
Occasional Contributor

Re: Compiler error 2513_D & 2393

Dennis, this was a big help. The actual compile command is generated dynamiclly by a script provided by someone else. By adding "-H" to the "cc" command, I was able to determine that the file "/usr/include/sys/time.h" was being included and not "/usr/include/time.h."

/usr/include/sys/time.h does not have the missing prototypes.

/usr/include/sys/time.h is actually a "sub-include" of time.h.


Thanks,
George