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. Successful Debug Build, but got Errors during Release Build

Successful Debug Build, but got Errors during Release Build

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

    Hi There. I am using sone 3rd party libraries and am able to successfully Debug build my application. Now, when I try to Release build the same piece of code, I am getting below error messages. Let me list few of them...

    error C2146: syntax error : missing ';' before identifier 'HOPTIONSET'
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C2065: 'VWCALLBACKPROC' : undeclared identifier
    ......................................
    ......................................
    ......................................So On....

    Please provide some pointers/suggestions for the same. Thanks PanB

    C 1 Reply Last reply
    0
    • P PankajB

      Hi There. I am using sone 3rd party libraries and am able to successfully Debug build my application. Now, when I try to Release build the same piece of code, I am getting below error messages. Let me list few of them...

      error C2146: syntax error : missing ';' before identifier 'HOPTIONSET'
      error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      error C2065: 'VWCALLBACKPROC' : undeclared identifier
      ......................................
      ......................................
      ......................................So On....

      Please provide some pointers/suggestions for the same. Thanks PanB

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

      Make sure that your project options are the same for debug and release (concerning the include directories, the lib directories, additional dependencies, ...). In brief: everything you changed in the configuration for debug mode should also be done for the release mode.

      Cédric Moonen Software developer
      Charting control [v1.5] OpenGL game tutorial in C++

      P 1 Reply Last reply
      0
      • C Cedric Moonen

        Make sure that your project options are the same for debug and release (concerning the include directories, the lib directories, additional dependencies, ...). In brief: everything you changed in the configuration for debug mode should also be done for the release mode.

        Cédric Moonen Software developer
        Charting control [v1.5] OpenGL game tutorial in C++

        P Offline
        P Offline
        PankajB
        wrote on last edited by
        #3

        I have crossed checked them, they are absolutely similar to each other. Any other pointer/suggestion will be really helpful. Thanks.

        I 1 Reply Last reply
        0
        • P PankajB

          I have crossed checked them, they are absolutely similar to each other. Any other pointer/suggestion will be really helpful. Thanks.

          I Offline
          I Offline
          Iain Clarke Warrior Programmer
          wrote on last edited by
          #4

          Then look through the headers, looking for lines like:

          #ifdef DEBUG
          struct _some_struct_that_the_compiler_can't_find_in_release_
          {
          int evil;
          };
          #endif

          I hope that made the point. Don't read the whole thing by eye - get the computer to search for terms from the error messages, and then read up from there. Hope that helps, Iain.

          In the process of moving to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

          P 1 Reply Last reply
          0
          • I Iain Clarke Warrior Programmer

            Then look through the headers, looking for lines like:

            #ifdef DEBUG
            struct _some_struct_that_the_compiler_can't_find_in_release_
            {
            int evil;
            };
            #endif

            I hope that made the point. Don't read the whole thing by eye - get the computer to search for terms from the error messages, and then read up from there. Hope that helps, Iain.

            In the process of moving to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

            P Offline
            P Offline
            PankajB
            wrote on last edited by
            #5

            Thanks for the reply guys. BAD NEWS> I have cross checked project settings - Debug/Release i.e., (a)C/C++ > Additional Include Directories (b)Linker > General > Additional Library Directories Linker > Input > Additional Dependencies Should I need to check some other property apart from mentioned above? Also, I am not able to find DEBUG in my full code/solution. :( Just want to know, I am using same 3rd party dlls/libs for Debug/Release mode. Can they create this type of problem? Thanks PanB

            P 1 Reply Last reply
            0
            • P PankajB

              Thanks for the reply guys. BAD NEWS> I have cross checked project settings - Debug/Release i.e., (a)C/C++ > Additional Include Directories (b)Linker > General > Additional Library Directories Linker > Input > Additional Dependencies Should I need to check some other property apart from mentioned above? Also, I am not able to find DEBUG in my full code/solution. :( Just want to know, I am using same 3rd party dlls/libs for Debug/Release mode. Can they create this type of problem? Thanks PanB

              P Offline
              P Offline
              PankajB
              wrote on last edited by
              #6

              Guys just an update >>>> If I copy Preprocessor Defn and Runtime Library settings from Debug and copy them for Release, then I got success with Release Build but at the time execution my application just blow up.... Any clues, What I can do at the minimal level to make my Release build a success and also can execute my Release type application. Thanks PanB

              J 1 Reply Last reply
              0
              • P PankajB

                Guys just an update >>>> If I copy Preprocessor Defn and Runtime Library settings from Debug and copy them for Release, then I got success with Release Build but at the time execution my application just blow up.... Any clues, What I can do at the minimal level to make my Release build a success and also can execute my Release type application. Thanks PanB

                J Offline
                J Offline
                Joseph Marzbani
                wrote on last edited by
                #7

                Check the whole code out and look for uninitialized variables (specially local ones). For example you may have such a thing somewhere in your code: CString strVariable ; instead of: CString strVariable = _T("");

                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