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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem:big dll size

Problem:big dll size

Scheduled Pinned Locked Moved C / C++ / MFC
c++debugginghelpquestionannouncement
5 Posts 4 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.
  • H Offline
    H Offline
    happycpp
    wrote on last edited by
    #1

    hello everyone.. this is my first post in this forum and actually it's a question about DLL's: I made a *.cpp file with the following #include #include LPCSTR _stdcall OpenSound (LPCSTR lpfile){ CString str = lpfile; MCIERROR dwRet; str = "open \"" + str + "\" alias jack"; dwRet = mciSendString(str,NULL,0,NULL); if (dwRet) MessageBox(NULL,"Fail to open","Hello!",0); else if (mciSendString("close all",NULL,0,NULL)) MessageBox(NULL,"Fail to close","Hello!",0); //MessageBox(NULL,(LPCSTR)str,"Hello!",0); return lpfile; } and ofcourse I made a *.def file for it.. the problem is that the final DLL is TOO big ((80.0 kb in Release and 1.23 mb in Debug)) I made a dll in vb which contains a lot of functions and the size of it was about 60.0 kb.. so is there a way to minimize the DLL made by c++..

    M D G 3 Replies Last reply
    0
    • H happycpp

      hello everyone.. this is my first post in this forum and actually it's a question about DLL's: I made a *.cpp file with the following #include #include LPCSTR _stdcall OpenSound (LPCSTR lpfile){ CString str = lpfile; MCIERROR dwRet; str = "open \"" + str + "\" alias jack"; dwRet = mciSendString(str,NULL,0,NULL); if (dwRet) MessageBox(NULL,"Fail to open","Hello!",0); else if (mciSendString("close all",NULL,0,NULL)) MessageBox(NULL,"Fail to close","Hello!",0); //MessageBox(NULL,(LPCSTR)str,"Hello!",0); return lpfile; } and ofcourse I made a *.def file for it.. the problem is that the final DLL is TOO big ((80.0 kb in Release and 1.23 mb in Debug)) I made a dll in vb which contains a lot of functions and the size of it was about 60.0 kb.. so is there a way to minimize the DLL made by c++..

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      80kb doesn't sound too large to me. What version of CString are you using? Is it the MFC or ATL version? Are you statically linking or dynaminc link ATL/MFC What kind of compiler optimisation settings are you using? Michael CP Blog [^]

      H 1 Reply Last reply
      0
      • M Michael P Butler

        80kb doesn't sound too large to me. What version of CString are you using? Is it the MFC or ATL version? Are you statically linking or dynaminc link ATL/MFC What kind of compiler optimisation settings are you using? Michael CP Blog [^]

        H Offline
        H Offline
        happycpp
        wrote on last edited by
        #3

        I'm using the MFC and I don't know how to know if it's statically or dynamically!! also I don't know about the optimisation thing.. actually I'm a very newb to these stuff..

        1 Reply Last reply
        0
        • H happycpp

          hello everyone.. this is my first post in this forum and actually it's a question about DLL's: I made a *.cpp file with the following #include #include LPCSTR _stdcall OpenSound (LPCSTR lpfile){ CString str = lpfile; MCIERROR dwRet; str = "open \"" + str + "\" alias jack"; dwRet = mciSendString(str,NULL,0,NULL); if (dwRet) MessageBox(NULL,"Fail to open","Hello!",0); else if (mciSendString("close all",NULL,0,NULL)) MessageBox(NULL,"Fail to close","Hello!",0); //MessageBox(NULL,(LPCSTR)str,"Hello!",0); return lpfile; } and ofcourse I made a *.def file for it.. the problem is that the final DLL is TOO big ((80.0 kb in Release and 1.23 mb in Debug)) I made a dll in vb which contains a lot of functions and the size of it was about 60.0 kb.. so is there a way to minimize the DLL made by c++..

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          This is a very common misconception among new Windows programmers. I suggest you read these three articles: http://www.flounder.com/howbig.htm http://msdn.microsoft.com/msdnmag/issues/01/01/hood/ http://www.microsoft.com/msj/archive/S569.aspx


          "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

          1 Reply Last reply
          0
          • H happycpp

            hello everyone.. this is my first post in this forum and actually it's a question about DLL's: I made a *.cpp file with the following #include #include LPCSTR _stdcall OpenSound (LPCSTR lpfile){ CString str = lpfile; MCIERROR dwRet; str = "open \"" + str + "\" alias jack"; dwRet = mciSendString(str,NULL,0,NULL); if (dwRet) MessageBox(NULL,"Fail to open","Hello!",0); else if (mciSendString("close all",NULL,0,NULL)) MessageBox(NULL,"Fail to close","Hello!",0); //MessageBox(NULL,(LPCSTR)str,"Hello!",0); return lpfile; } and ofcourse I made a *.def file for it.. the problem is that the final DLL is TOO big ((80.0 kb in Release and 1.23 mb in Debug)) I made a dll in vb which contains a lot of functions and the size of it was about 60.0 kb.. so is there a way to minimize the DLL made by c++..

            G Offline
            G Offline
            gamitech
            wrote on last edited by
            #5

            too big for what man ? gabby

            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