Home » Category » DotNet Visual C

DotNet Visual C: ICE with __declspec(dllimport) psymtab.c line 4227

206| Mon, 31 Dec 2007 14:59:00 GMT| geoffrey| Comments (1)
We write lots of cross platform code at my company. To facilitate
this, class declarations are handled like this (simplification):

#if defined(_WIN32)
#if defined(BUILDLIB)
#define CLASSDECLARE( c ) class __declspec(dllexport) c
#else
#define CLASSDECLARE( c ) class c //note the absence of dllimport
#endif
#endif

#if defined(_SOMEOTHERPLATFORM)
#define CLASSDECLARE( c ) //irrelevent never seen by cl.exe
#endif

....

CLASSDECLARE( MyClass )
{
public:
....
}

Changing CLASSDECLARE in the case that BUILDLIB is not defined to

#define CLASSDECLARE( c ) class __declspec(dllimport) c

cases an ICE:

fatal error C1001: INTERNAL COMPILER ERROR (compiler file
'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symta b.c', line 4227)
Please choose the Technical Support command on the Visual C++ Help
menu, or open the Technical Support help file for more information
Solid : error PRJ0002 : error result returned from 'cl.exe'.

Keywords & Tags: ice, __declspec, dllimport, psymtab.c, line, 4227, dotnet, visual, .net

URL: http://dotnet.itags.org/visual-c/71196/
 
«« Prev - Next »» 1 helpful answers below.
>We write lots of cross platform code at my company. To facilitate
>this, class declarations are handled like this (simplification):
>...
>cases an ICE:

Geoffrey,

Can you give us a minimal concrete example - something that can be
simply pasted into a console application and cause the problem.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

davidlowndes | Mon, 31 Dec 2007 15:00:00 GMT |

DotNet Visual C Hot Answers

DotNet Visual C New questions

DotNet Visual C Related Categories