Results 1 to 4 of 4

Thread: Visual C + + 2010 asking for dll file

  1. #1
    Join Date
    Sep 2010
    Posts
    21

    Visual C + + 2010 asking for dll file

    I wrote a simple program in C, I compiled the solution, I went to get the exe from the Debug folder, moved away and worked perfectly. I give to my friend and requires a DLL (msvcrt.dll or should be something like what he says). Download the dll and leaves. I did the test with three people, one with Windows XP, Windows Vista and one with a Windows 7-all with the same problem. Here's the code:
    Code:
    # Include <math.h>
     int main ()
     {
         long int x = 5;
         long int y;
         for (;;)
         {
                  y = (x * x - 1) / 2;
                  if (y <0) continue;
                  if ((x * x) == ((y +1) * (y +1) - y * y))
                  printf ("\ n% d% d% d", x, y, (y +1));
                  x + = 2;
                  if (x == 62235) break;
          }
     return 0;
     }
    Apart from the code that may be obscene as you like, where am I wrong?

  2. #2
    Join Date
    Apr 2009
    Posts
    64

    Re: Visual C + + 2010 asking for dll file

    You must not distribute the Debug version of the application, for it is dynamically linked to the CRT debugging (which is not freely available) is not optimized and is particularly large because it contains debug information. When you want to generate the exe to deploy, you have to put the project in release mode, compile and make the executable from the folder Release. Note however that if the project is set to use the DLL version of CRT is necessary, however, that on the PC where you are going to run the program you have installed the redist of VC + + 2010 ( link ) if you want the program to go without additional prerequisites, you must set the properties for the project linking the static version of CRT. The executable of course will increase a little 'in terms of size (CRT is incorporated into the part of the executable used in your program).

  3. #3
    Join Date
    Nov 2008
    Posts
    94

    Re: Visual C + + 2010 asking for dll file

    All this applies to unmanaged applications, managed applications, however, is of course always necessary that the target machine is installed the appropriate version of .NET Framework. Apart from the DLL speech, I say that this code could be optimized * *, even from a formal point of view: If you are interested I can post the code better. I just noticed that you include the <math.h> then do not use ..

  4. #4
    Join Date
    Apr 2009
    Posts
    40

    Re: Visual C + + 2010 asking for dll file

    X 3 and the part will increase, but will always be an integer (that is declared int); if you study the function you realize that the minimum is -1 / 2 in fact:
    • For x = 0 -> y = -1 / 2
    • For x = 1 -> y = 0
    • For x = "-> y = 3 / 2
    Ultimately becomes negative y iff x = 0, but in your cycle, the minimum value that x takes is 3. I was having similar issues some days ago, so I thought ... try to remove the line, compile and run ... at some point negative press y and y +1 and then it worked properly. I hope this post will help you.

Similar Threads

  1. Visual Studio 2010 and SilverLight 3.
    By Licka Boy in forum Windows Software
    Replies: 5
    Last Post: 19-04-2011, 10:35 AM
  2. 2010 visual report not working with excel 2010
    By skier9er in forum Microsoft Project
    Replies: 5
    Last Post: 27-03-2011, 06:41 AM
  3. Replies: 2
    Last Post: 16-02-2011, 02:49 PM
  4. Can't install visual studio 2010
    By DarkShadow in forum Windows Software
    Replies: 4
    Last Post: 18-02-2010, 09:13 PM
  5. Compare Visual Studio 2010 and Visual Web Developer Express
    By Zacharia in forum Software Development
    Replies: 5
    Last Post: 28-01-2010, 04:27 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,177,428.33168 seconds with 17 queries