Newbie General Questions & Error on Non-Dev Machines

Hello,

I've just started programming C++ as of today, so yes I am a newbie, but I do have some experience in Java and GML so hopefully it will come in handy.

First off I'd like to know if there is some kind of function list for standard C++ Libraries.. For Java and GML their is an obvious list of all the functions and parameters easily available to all programmers. From what I can see, even MSDN doesn't offer something like this.

Secondly whenever I use, lets say, #include <windows.h> I get an error similar to:
Error 1 fatal error C1083: Cannot open include file: 'windows.h': No such file or directory c:\documents and settings\************\my documents\visual studio 2005\projects\************\***********\Form1.h 2


Finally and probably most importantly.. how do you distribute your .exe to others I realize this probably sounds like a silly question.... but whenever a non-developer trys to execute a program they get an error
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem

Can someone tell me exactly what you're supposed to do to fix this. Note: I'm using the Express Edition. I searched for hours on the web looking for a simple solution or one that seemed feasible atleast...
- Do you have to have an installer or can you simply include the files in the program directory
- What files do I include What exactly am I supposed to do to get rid of the error message

Thank you very much in advance,

I know I probably sound like a big n00b to Visual Studio right now, but I hope to become much more than that within the next few days, I'm already getting the hang of the user interface and code :)

Thanks for your help once again



Answer this question

Newbie General Questions & Error on Non-Dev Machines

  • barontufsap

    I have the same problem. Neither VC++ Express nor the Platform SDK have a uuidgen.exe. The only uuidgen.exe on my disk is the one from an existing install of Visual Studio .NET 2003, which I have installed side-by-side with VC++ Express. This uuidgen.exe is of course not in the path when starting a command prompt in VC++ Express.

    Could it be that the setup for VC++ Express does not install uuidgen.exe when there is already another one installed I really can't image that.


  • pwi11

    I am using the Visual Studio Command Prompt (As I said above) but I am still receiving the error message.


  • jackrackam

    uuidgen.exe is part of Visual Studio.  When following the instructions, you should run a Visual Studio command prompt instead of a regular command prompt.

    Start Menu - Programs - Microsoft Visual Studio 2005 - Visual Studio Tools - Visual Studio 2005 Command Prompt.

    Ted.

     


  • DirtyHowi

    pythonpoole-

    How did you ultimately solve the error message about "cannot open include file: 'windows.h'"

    I am getting the same message and have been through all of the setup (including the ones given in response to your original question) and still cannot get Visual C++ 2005 Express Edition to compile a simple program.

    Thanks for you help on this.



  • vessel

    Uuidgen.exe is part of the normal install of the Platform SDK (under "\Program Files\Microsoft Platform SDK\Bin"). It is not part of Visual C++ Express. If all you need is a program that makes GUIDs, you can compile+run this C++/CLI program:

    // compile with cl.exe /clr
    int main(cli::array<System::String ^> ^args)
    {
      System::Console::WriteLine(System::Guid::NewGuid().ToString());
      return 0;
    }

    This pretty much is the entire source code to uuidgen.exe (although the PSDK version has extra command line support, error handling, returns uuids in a number of formats, can return more than one uuid, and doesn't need .Net v2.0).

     



  • monika

    Thank you for your post...

    However I have a problem... Nikola's Blog Guide didn't work for me.. specifically  step number 4.

    I opened up the visual studio command prompt and entered the command uuidgen –n2 but it returns the standard ms-dos error message:

    'uuidgen' is not recognized as an internal or external command,
    operable program or batch file.

    Thank you again for your help.


  • xPropHead

    There is not a single listing of all available C++ libraries.

    You are probably getting an error for Windows.h because you either:
    1) Did not dowload and install the platform SDK yet or
    2) Did not add the directories for the header files and libraries

    See instructions for both at:
    http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

    And for distributing programs you build with Visual C++ 2005, look at the following entry on Nikola's blog:
    http://blogs.msdn.com/nikolad/archive/2005/09/02/460368.aspx

    Ronald Laeremans
    Visual C++ team


  • Antony Kancidrowski

    Please follow the instructions given by Ronald Laeremans:

    RonaldLaeremans wrote:

    You are probably getting an error for Windows.h because you either:
    1) Did not dowload and install the platform SDK yet or
    2) Did not add the directories for the header files and libraries

    See instructions for both at:
    http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

    You must follow All 5 steps given in the link.



  • New2Avalon

    Can you verify you have a uuidgen.exe in either of the following two folders:

    \Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin

    \Program Files\Microsoft Visual Studio 8\Common7\Tools

    If so then there's something a matter with your command prompt.  Check the path by typing PATH

    If not, then you may have to download the Platform SDK (which includes it)

     


  • Marius_m

    Hi thanks for all your replies.. this seems to be mostly solved now, I located uuidgen.exe in my platform sdk path.

    Anyway now I have another small issue, that again sounds a bit stupid. The MSDN library keeps reffering to the sample examples that come with Express and the Platform SDK... yet I cannot find any, even a system wide computer search returned no other .sln projects than the ones i created myself. Am I missing something

    For example it might say: Open the solution mdi.sln... no such file exists on my computer

    And every body keeps refering to these non-existant samples... I'm obviously missing something.

    Thanks for the help.


  • Newbie General Questions & Error on Non-Dev Machines