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. linking issue

linking issue

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
3 Posts 3 Posters 1 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.
  • T Offline
    T Offline
    tasumisra
    wrote on last edited by
    #1

    Hello All, I have C++ dll, that has some exposed functionality using Def files, among all those CPP files there is one Cpp (Lets call it "Generator.cpp") files that dosnt gets compile normally but it is used to generate supporting C++ file that is exposed in Def files.(some how...some developer thought process, Legacy code) the Generator.cpp looks like this

    #ifdef _USRDLL
    #pragma comment(linker, "/EXPORT:GenerateFiles=?GenerateFile@@YGJPAUHWND__@@PAUHINSTANCE__@@PADH@Z")
    #endif

    __declspec(dllexport) HRESULT __stdcall GenerateFiles(HWND hwnd,HINSTANCE hinst,LPSTR lpCmdLine,int nCmdShow)
    {
    /// some code to generate CPP files exposing by the DLL
    }

    can some body help what commandline parameter i should pass so that possible EXPORT can happen and CPP file would be generated.

    vikas da

    V L 2 Replies Last reply
    0
    • T tasumisra

      Hello All, I have C++ dll, that has some exposed functionality using Def files, among all those CPP files there is one Cpp (Lets call it "Generator.cpp") files that dosnt gets compile normally but it is used to generate supporting C++ file that is exposed in Def files.(some how...some developer thought process, Legacy code) the Generator.cpp looks like this

      #ifdef _USRDLL
      #pragma comment(linker, "/EXPORT:GenerateFiles=?GenerateFile@@YGJPAUHWND__@@PAUHINSTANCE__@@PADH@Z")
      #endif

      __declspec(dllexport) HRESULT __stdcall GenerateFiles(HWND hwnd,HINSTANCE hinst,LPSTR lpCmdLine,int nCmdShow)
      {
      /// some code to generate CPP files exposing by the DLL
      }

      can some body help what commandline parameter i should pass so that possible EXPORT can happen and CPP file would be generated.

      vikas da

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Please, don't crosspost! You already started the similar thread in [ATL / WTL / STL Discussion Boards](https://www.codeproject.com/Forums/4486/ATL-WTL-STL.aspx)

      1 Reply Last reply
      0
      • T tasumisra

        Hello All, I have C++ dll, that has some exposed functionality using Def files, among all those CPP files there is one Cpp (Lets call it "Generator.cpp") files that dosnt gets compile normally but it is used to generate supporting C++ file that is exposed in Def files.(some how...some developer thought process, Legacy code) the Generator.cpp looks like this

        #ifdef _USRDLL
        #pragma comment(linker, "/EXPORT:GenerateFiles=?GenerateFile@@YGJPAUHWND__@@PAUHINSTANCE__@@PADH@Z")
        #endif

        __declspec(dllexport) HRESULT __stdcall GenerateFiles(HWND hwnd,HINSTANCE hinst,LPSTR lpCmdLine,int nCmdShow)
        {
        /// some code to generate CPP files exposing by the DLL
        }

        can some body help what commandline parameter i should pass so that possible EXPORT can happen and CPP file would be generated.

        vikas da

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I already explained that we do not have enough information. We have no idea what this code is for or how it is accessed from other applications.

        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