CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: vc++ error

  1. #1
    Join Date
    May 2009
    Posts
    3

    vc++ error

    Hi i have a problem ive complied a vc++ express edition 2008 form project in release mode no errors or warnings are produced during compile time but every time i try and execute the release .exe outside the project folder it fails and says '[insert prog name].exe has encounterd a problem and needs to close" however when i execute the debug build .exe outside the project folder it works fine.

    Any ideas ?

  2. #2
    Join Date
    Feb 2009
    Location
    India
    Posts
    444

    Re: vc++ error

    You can debug in release mode.
    Turn off optimization in C++ option of the project properties.
    «_Superman
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

  3. #3
    Join Date
    May 2009
    Posts
    3

    Re: vc++ error

    It is off everything in the optimization tab is either disabled or turned off.
    Any other ideas ?

  4. #4
    Join Date
    Apr 2008
    Posts
    725

    Re: vc++ error

    yes, now debug it in release

  5. #5
    Join Date
    May 2009
    Posts
    3

    Re: vc++ error

    Quote Originally Posted by Amleto View Post
    yes, now debug it in release
    Done but no change the release build still wont run outside the project but will run inside the project folder and whilst degugging.
    Last edited by rom877; May 30th, 2009 at 03:41 PM.

  6. #6
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128

    Re: vc++ error

    I think the information provided may be incomplete. Since that the binary doesn't work in other locations, you may like to take a look in your code with files are being handled.
    quoted from C++ Coding Standards:

    KISS (Keep It Simple Software):
    Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.

    Avoid magic number:
    Programming isn't magic, so don't incant it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured