Announcement

Collapse
No announcement yet.

__declspec(dllexport / dllimport)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • __declspec(dllexport / dllimport)

    Hallo, <br>

    damit man eine Header-Datei nicht ändern muß, je nach dem, <br>
    ob man gerade eine DLL im- oder exportiert, <br>
    funktionierte folgendes unter BORLAND. <br>
    <br>
    #ifdef __DLL__ <br>
    #define DLL_EXIM_PORT __declspec(dllexport) <br>
    #else <br>
    #define DLL_EXIM_PORT __declspec(dllimport) <br>
    #endif <br>
    <br>
    Nun bin ich dazu verurteilt mit VC zu entwickeln (quäl – quäl). <br>
    Dort funktioniert das aber nicht. <br>
    Gibt es hier eine ähnliche Variante? <br>
    <br>
    MfG JB <br>

  • #2
    Hi

    Guckmal in ...\VCxx\Include\excpt.h .

    <PRE>
    /* Define _CRTIMP */
    #ifndef _CRTIMP
    #ifdef _DLL
    #define _CRTIMP __declspec(dllimport)
    #else /* ndef _DLL */
    #define _CRTIMP
    #endif /* _DLL */
    #endif /* _CRTIMP */
    </PRE>

    Grus Marti

    Comment


    • #3
      Hi

      Guckmal in ...\VCxx\Include\excpt.h .

      <PRE>
      /* Define _CRTIMP */
      #ifndef _CRTIMP
      #ifdef _DLL
      #define _CRTIMP __declspec(dllimport)
      #else /* ndef _DLL */
      #define _CRTIMP
      #endif /* _DLL */
      #endif /* _CRTIMP */
      </PRE>

      Gruss Marti

      Comment

      Working...
      X