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. creating .dll and .lib files

creating .dll and .lib files

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
9 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.
  • Y Offline
    Y Offline
    Y K Kishore Kumar
    wrote on last edited by
    #1

    How to create .dll and .lib files in a single build in VS2005. Is there any need to include some files for that ? Please help me.

    C 1 Reply Last reply
    0
    • Y Y K Kishore Kumar

      How to create .dll and .lib files in a single build in VS2005. Is there any need to include some files for that ? Please help me.

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      What's your problem exactly ? Where are you stuck ? You need to create a dll project (New Project -> 'Visual C++' -> 'Win32' -> 'Win32 PRoject'). Click next and you'll be able to select DLL as application type. The library file will be generated automatically once you have at least one exported function.


      Cédric Moonen Software developer
      Charting control [v1.2 - Updated]

      Y 1 Reply Last reply
      0
      • C Cedric Moonen

        What's your problem exactly ? Where are you stuck ? You need to create a dll project (New Project -> 'Visual C++' -> 'Win32' -> 'Win32 PRoject'). Click next and you'll be able to select DLL as application type. The library file will be generated automatically once you have at least one exported function.


        Cédric Moonen Software developer
        Charting control [v1.2 - Updated]

        Y Offline
        Y Offline
        Y K Kishore Kumar
        wrote on last edited by
        #3

        Hi. Thanks for the reply. My problem is i am creating a new project in VS2005 from the existing project of VC6.0. It is not able to create the .lib automatically with the dll. I have checked all the settings of the project but could not get success. So i wanted to know whether any new thing has to be done in VS2005 while converting the old project to create dll ?

        C 1 Reply Last reply
        0
        • Y Y K Kishore Kumar

          Hi. Thanks for the reply. My problem is i am creating a new project in VS2005 from the existing project of VC6.0. It is not able to create the .lib automatically with the dll. I have checked all the settings of the project but could not get success. So i wanted to know whether any new thing has to be done in VS2005 while converting the old project to create dll ?

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          Do you have at least one exported function ( one that is starting with __declspec(dllexport) ) ? Did you use the conversion wizard to convert from the VC6 project to the VS2005 project ?


          Cédric Moonen Software developer
          Charting control [v1.2 - Updated]

          Y 1 Reply Last reply
          0
          • C Cedric Moonen

            Do you have at least one exported function ( one that is starting with __declspec(dllexport) ) ? Did you use the conversion wizard to convert from the VC6 project to the VS2005 project ?


            Cédric Moonen Software developer
            Charting control [v1.2 - Updated]

            Y Offline
            Y Offline
            Y K Kishore Kumar
            wrote on last edited by
            #5

            Yes i have the following function with __declspec() #define SS_NOTHROW __declspec(nothrow) and yes. i have used the option File -> New -> Project from ExistingCode... option while creating

            C 1 Reply Last reply
            0
            • Y Y K Kishore Kumar

              Yes i have the following function with __declspec() #define SS_NOTHROW __declspec(nothrow) and yes. i have used the option File -> New -> Project from ExistingCode... option while creating

              C Offline
              C Offline
              Cedric Moonen
              wrote on last edited by
              #6

              Y K Kishore Kumar wrote:

              #define SS_NOTHROW __declspec(nothrow)

              First that's not a function and second, this macro doesn't even export a function. Just to make a test, add this piece of code to one of your header file:

              int __declspec(dllexport) Test()
              {
              return 42;
              }


              Cédric Moonen Software developer
              Charting control [v1.2 - Updated]

              Y 1 Reply Last reply
              0
              • C Cedric Moonen

                Y K Kishore Kumar wrote:

                #define SS_NOTHROW __declspec(nothrow)

                First that's not a function and second, this macro doesn't even export a function. Just to make a test, add this piece of code to one of your header file:

                int __declspec(dllexport) Test()
                {
                return 42;
                }


                Cédric Moonen Software developer
                Charting control [v1.2 - Updated]

                Y Offline
                Y Offline
                Y K Kishore Kumar
                wrote on last edited by
                #7

                Great. Its working now. thankyou very much. But can u please explain the scenario if u have time. ? Because some projects are working without this function. Once again thankyou verymuch. Kishore.

                C 1 Reply Last reply
                0
                • Y Y K Kishore Kumar

                  Great. Its working now. thankyou very much. But can u please explain the scenario if u have time. ? Because some projects are working without this function. Once again thankyou verymuch. Kishore.

                  C Offline
                  C Offline
                  Cedric Moonen
                  wrote on last edited by
                  #8

                  Y K Kishore Kumar wrote:

                  Because some projects are working without this function.

                  You need to export at least one function so that the lib file will be generated. In your case, if no lib file is generated, it means that no function has been exported. So, it means that your dll is useless :-D (a dll that doesn't export anything is completely useless). If you need to add this function to have a lib file generated, then I think you have a problem.


                  Cédric Moonen Software developer
                  Charting control [v1.2 - Updated]

                  Y 1 Reply Last reply
                  0
                  • C Cedric Moonen

                    Y K Kishore Kumar wrote:

                    Because some projects are working without this function.

                    You need to export at least one function so that the lib file will be generated. In your case, if no lib file is generated, it means that no function has been exported. So, it means that your dll is useless :-D (a dll that doesn't export anything is completely useless). If you need to add this function to have a lib file generated, then I think you have a problem.


                    Cédric Moonen Software developer
                    Charting control [v1.2 - Updated]

                    Y Offline
                    Y Offline
                    Y K Kishore Kumar
                    wrote on last edited by
                    #9

                    OK. got it. thankyou very much once again.

                    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