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

  • geoffrey / 206 / Sat, 30 Jan 2010 19:08:00 GMT / 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:

    ice, __declspec, dllimport, psymtab.c, line, 4227, dotnet, visual, .net

  • http://dotnet.itags.org/visual-c/71196/«« Last Thread - Next Thread »»
    1. >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 |