locked
hello world using windows sdk RRS feed

  • Question

  • I installed windows sdk and did a hello world in C below conforms

    #include <stdio.h>
    #include <stdlib.h>
    #include <windows.h>

    int main(int argc, char **argv)
    {
            fprintf(stderr,"\nHello World\n");
            return 0;
    }

    Hi follow the following link to compile via the command line without using visual studio but not found commands nmake or the bin directory of windows sdk. Does anyone know how to compile a code via command line.

    http://blogs.msdn.com/b/windowssdk/archive/2008/01/11/how-to-build-from-the-windows-sdk-command-line.aspx

    Regards.


    Ricardo Barbosa
    Saturday, June 26, 2010 9:09 PM

Answers

  • Check %ProgramFiles%\Microsoft SDKs\Windows\versionnumber\bin

    If SDK is installed correctly it should register itself to Visual Studio's binary search path. Check your Visual Studio options->Visual C++ directories.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Sunday, June 27, 2010 4:14 AM
  • yes, you can use cl.exe from Windows SDK.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Sunday, June 27, 2010 2:47 PM
  • Ricardo,

    The Windows SDK provides a build environment shortcut from the start menu (Start Menu\Programs\Microsoft Windows SDK v7.1\Windows SDK 7.1 Command Prompt)  the environment has environment variables set that should allow you use cl.exe or nmake.exe or msbuild.exe to build the SDK samples or your own applications.

    Hope this helps,

    Derek(Windows SDK)

    Monday, June 28, 2010 9:38 PM

All replies

  • Check %ProgramFiles%\Microsoft SDKs\Windows\versionnumber\bin

    If SDK is installed correctly it should register itself to Visual Studio's binary search path. Check your Visual Studio options->Visual C++ directories.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Sunday, June 27, 2010 4:14 AM
  • Hi Sheng Jiang,

    Thanks for replying, there any way to write code and compile without having visual studio? I do not want to use the visual studio. Thanks

    Regards.


    Ricardo Barbosa
    Sunday, June 27, 2010 1:53 PM
  • yes, you can use cl.exe from Windows SDK.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Sunday, June 27, 2010 2:47 PM
  • Ricardobarbosams wrote:
    >
    >Thanks for replying, there any way to write code and compile without
    >having visual studio? I do not want to use the visual studio. Thanks
     
    Why? The "Express Editions" of Visual Studio are free.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP
    Sunday, June 27, 2010 11:43 PM
  • Ricardo,

    The Windows SDK provides a build environment shortcut from the start menu (Start Menu\Programs\Microsoft Windows SDK v7.1\Windows SDK 7.1 Command Prompt)  the environment has environment variables set that should allow you use cl.exe or nmake.exe or msbuild.exe to build the SDK samples or your own applications.

    Hope this helps,

    Derek(Windows SDK)

    Monday, June 28, 2010 9:38 PM