locked
Problem with MFC application that uses win32.dll file RRS feed

  • Question


  • Hello,
    (I'm using Microsoft Visual Studio C++ 6.0)

    I made win32.dll file-CppAIRPlug.dll with these project properties:
    - precomplied header - automatically
    - run- time library - Debug/Multithreaded DLL (depending of prepocessor definitions)
    - not using MFC classes

    After that I made testing of CppAIRPlug.dll functions by making win32 Console application. I included static library CppAIRPlug.lib and folder with header files and it worked without any problems. (win32 application properties were the same one as in project where I made CppAIRPlug).

    Next step is to integrate use CppAIRPlug.dll functions in MFC application that already exist. MFC application properties are:
    - precomplied header - Stdafx.h
    - run- time library - Debug/Multithreaded (depending of prepocessor definitions)
    - using MFC classes in static link
    When I include header files that belong to CppAIRPlug.dll and static library mapped to CppAIRPlug.dll (as same as in tested win32 application that worked properly) while building application I got problems in header files like:


    CoreIncludeCoreInclude\JSocket.h(293) : error C2501: 'SOCKET' : missing storage-class or type specifiers
    \JSocket.h(293) : error C2501: 'mySocket' : missing storage-class or type specifiers

    Why it worked fine with win32 application and it doesn't work with MFC application when all files (CppAIRPlug.dll, CppAIRPlug.lib, header files) are the same? Is is related to MFC classes? If I solve this problem, shall I later have problem with linking (linking libraries are different)?

    Tnx very much,
    Aleks
    Tuesday, June 13, 2006 3:42 PM

Answers

All replies