Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Warning C4275 non dll-interface class

Warning C4275 non dll-interface class

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiotutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1354
    wrote on last edited by
    #1

    We use a lib and a dll to store our shared dialogs. At compile time we get the following warning: i:\eldis3\bib_source\eurodialoge\errdlg.h(19) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog' This warning seems to be really just a warning (We cant find any real problems... ...but... ...a warning is a warning. Does anyone knows how to get rid of this? This is how we declare our class: class LIB_EXPORT ErrDlg : public CDialog where LIB_EXPORT is: #ifdef _AFXDLL // Sonderfall MFC-Klassen in DLL #define LIB_EXPORT AFX_EXT_CLASS #else #define LIB_EXPORT __declspec( dllexport ) #endif #else // UNIX #define LIB_EXPORT #endif

    K 1 Reply Last reply
    0
    • U User 1354

      We use a lib and a dll to store our shared dialogs. At compile time we get the following warning: i:\eldis3\bib_source\eurodialoge\errdlg.h(19) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog' This warning seems to be really just a warning (We cant find any real problems... ...but... ...a warning is a warning. Does anyone knows how to get rid of this? This is how we declare our class: class LIB_EXPORT ErrDlg : public CDialog where LIB_EXPORT is: #ifdef _AFXDLL // Sonderfall MFC-Klassen in DLL #define LIB_EXPORT AFX_EXT_CLASS #else #define LIB_EXPORT __declspec( dllexport ) #endif #else // UNIX #define LIB_EXPORT #endif

      K Offline
      K Offline
      Kurt 0
      wrote on last edited by
      #2

      Hi seems to me that you are using MFC staticaly linked, so CDialog isn't in a DLL but in the lib. Guess youget rid of that warning when you use MFC as a shared DLL.

      U 1 Reply Last reply
      0
      • K Kurt 0

        Hi seems to me that you are using MFC staticaly linked, so CDialog isn't in a DLL but in the lib. Guess youget rid of that warning when you use MFC as a shared DLL.

        U Offline
        U Offline
        User 1354
        wrote on last edited by
        #3

        The MFC is shared (in every project)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups