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. ATL / WTL / STL
  4. How to use .Def File

How to use .Def File

Scheduled Pinned Locked Moved ATL / WTL / STL
c++helptutorial
8 Posts 2 Posters 33 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 am working on a legacy application , i am seeing it has some .Def file that is using to generate some cpp file and its used inside the same project. Can somebody help me in understanding how to invoke .Def file.

    vikas da

    L 1 Reply Last reply
    0
    • T tasumisra

      Hello All, I am working on a legacy application , i am seeing it has some .Def file that is using to generate some cpp file and its used inside the same project. Can somebody help me in understanding how to invoke .Def file.

      vikas da

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

      These files are used to list the entry points that should be exported from the final library file. See -DEF (Specify Module-Definition File)[^].

      T 1 Reply Last reply
      0
      • L Lost User

        These files are used to list the entry points that should be exported from the final library file. See -DEF (Specify Module-Definition File)[^].

        T Offline
        T Offline
        tasumisra
        wrote on last edited by
        #3

        Thank you so much

        Richard MacCutchan
        

        for reply. so project looks like this, project structure looks like this. it has a def file that has function to be exported, it has a generator.cpp that generates x.cpp file it has x.cpp file that expose some function that is used in other projects now first i have to use .def file to invoke methods in Generator.cpp to generate the x.cpp file and then compile the project so that the generated dll can be used by other application. what i am not aware of ...how to invoke Generator.cpp ...is there any parameter that i can tweak during compilation time so that it generate the CPP files first and then compile the DLL or any other possible way Thank you so much in advance

        vikas da

        L 1 Reply Last reply
        0
        • T tasumisra

          Thank you so much

          Richard MacCutchan
          

          for reply. so project looks like this, project structure looks like this. it has a def file that has function to be exported, it has a generator.cpp that generates x.cpp file it has x.cpp file that expose some function that is used in other projects now first i have to use .def file to invoke methods in Generator.cpp to generate the x.cpp file and then compile the project so that the generated dll can be used by other application. what i am not aware of ...how to invoke Generator.cpp ...is there any parameter that i can tweak during compilation time so that it generate the CPP files first and then compile the DLL or any other possible way Thank you so much in advance

          vikas da

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

          I am sorry but it is impossible to guess what the build process is supposed to be. You need to find the person who set the project up in the first place.

          T 1 Reply Last reply
          0
          • L Lost User

            I am sorry but it is impossible to guess what the build process is supposed to be. You need to find the person who set the project up in the first place.

            T Offline
            T Offline
            tasumisra
            wrote on last edited by
            #5

            Thank you Richard , the person has quit...:) i guess i would need some more time to understand this code.

            vikas da

            L 1 Reply Last reply
            0
            • T tasumisra

              Thank you Richard , the person has quit...:) i guess i would need some more time to understand this code.

              vikas da

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

              Sorry I cannot offer any better suggestions. But without seeing the entire project (which I do not want to do) it is difficult to make any useful guesses.

              T 1 Reply Last reply
              0
              • L Lost User

                Sorry I cannot offer any better suggestions. But without seeing the entire project (which I do not want to do) it is difficult to make any useful guesses.

                T Offline
                T Offline
                tasumisra
                wrote on last edited by
                #7

                i am thinking to give some details ,:) my CPP file looks like this ... headers #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 } now can i invoke GenerateFiles method during build process some way ?

                vikas da

                L 1 Reply Last reply
                0
                • T tasumisra

                  i am thinking to give some details ,:) my CPP file looks like this ... headers #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 } now can i invoke GenerateFiles method during build process some way ?

                  vikas da

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

                  Sorry, I have no idea. Where is that function called from, and what is it supposed to do?

                  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