To create a DLL with the full project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gnanapoongothai
    New Member
    • Jun 2007
    • 62

    To create a DLL with the full project

    Hai,
    i have a vc++ project with different files. Can i make this into one DLL.

    Or i have combined the files to a single file.and making the main function as export and the main is using someother functions inside. But whe compling i am getting an error like

    error C2448: '<Unknown>' : function-style initializer appears to be a function definition

    What could be done for this.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You need to create your VC++ project as a Win32 project and when the wizard appears, select Application Settings and there you select DLL as the project type.

    You do not put all your code into one file.

    DLLs do not have a main(). There is a DLLMain() but that is only called by Windows when you unload the DLL. This allowes you to clean up any resource allocations yu may have made.

    Instead, you create a .DEF file to export the mangled C++ name as an unmangled C name. Otherwise, GetProcAddress( ) won't be able to find tour function.

    Comment

    Working...