Giter Site home page Giter Site logo

stahta01 / winapi-snippets-cmake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caiorss/winapi-snippets-cmake

0.0 1.0 0.0 51 KB

Code snippets and examples for Windows API in modern C++ managed by CMake.

CMake 12.40% Batchfile 4.91% C++ 82.69%

winapi-snippets-cmake's Introduction

Windows API Examples in Modern C++ managed by single CMake Project.

Outline

This repository contains many Windows API examples in modern C++ managed by CMake.

  • Note: It can be imported from Visual Studio, CLion or any other IDE with CMake support.

Build all codes from command line without any IDE:

  • Note: It assumes that Visual Studio community edition MSVC-2017 development tools are installed in the current machine.

Just double click or run the file cmake-build.bat or run the following command. It will build all targets, all examples and install to {PROJECT DIRECTORY}./bin. The examples can be testd by clicking at the executables in ./bin or invoking them from command line.

Or run the command:

$ cmake_build.bat 


 Automate CMake initialization.
 Building project 
 Setting up project
 --------------------------------------------------
 -- The C compiler identification is MSVC 19.16.27025.1
 -- The CXX compiler identification is MSVC 19.16.27025.1
 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Detecting C compile features
 -- Detecting C compile features - done
 -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
 -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Detecting CXX compile features
 -- Detecting CXX compile features - done
  [INFO] 64 bits build.
 -- Configuring done
 -- Generating done
 -- Build files have been written to: C:/Users/archbox/Desktop/winapi-cmake/build2
 Executing Install Target
 --------------------------------------------------

  ... ... ... ..  ... ... ... ..  ... ... ... ..  ... ... ... .. 

 Done Building Project "C:\Users\archbox\Desktop\winapi-cmake\build2\install.vcxproj" (default targets).

 Build succeeded.

 "C:\Users\archbox\Desktop\winapi-cmake\build2\install.vcxproj" (default target) (1) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\ALL_BUILD.vcxproj" (default target) (3) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\base64.vcxproj" (default target) (4) ->
 (ClCompile target) -> 
   C:\Users\archbox\Desktop\winapi-cmake\src\base64.cpp(47): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [C:\Users\archbox\Desktop\winapi-cmake\build2\base64.vcxproj]
   C:\Users\archbox\Desktop\winapi-cmake\src\base64.cpp(49): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [C:\Users\archbox\Desktop\winapi-cmake\build2\base64.vcxproj]
   C:\Users\archbox\Desktop\winapi-cmake\src\base64.cpp(58): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [C:\Users\archbox\Desktop\winapi-cmake\build2\base64.vcxproj]
   C:\Users\archbox\Desktop\winapi-cmake\src\base64.cpp(61): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [C:\Users\archbox\Desktop\winapi-cmake\build2\base64.vcxproj]


 "C:\Users\archbox\Desktop\winapi-cmake\build2\install.vcxproj" (default target) (1) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\ALL_BUILD.vcxproj" (default target) (3) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\guiBasic1.vcxproj" (default target) (5) ->
   C:\Users\archbox\Desktop\winapi-cmake\src\guiBasic1.cpp(167): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [C:\Users\archbox\Desktop\winapi-cmake\build2\guiBasic1.vcxproj]


 "C:\Users\archbox\Desktop\winapi-cmake\build2\install.vcxproj" (default target) (1) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\ALL_BUILD.vcxproj" (default target) (3) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\guiBasicNOWinmain.vcxproj" (default target) (6) ->
   C:\Users\archbox\Desktop\winapi-cmake\src\guiBasicNOWinmain.cpp(126): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [C:\Users\archbox\Desktop\winapi-cmake\build2\guiBasicNOWinmain.vcxproj]


 "C:\Users\archbox\Desktop\winapi-cmake\build2\install.vcxproj" (default target) (1) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\ALL_BUILD.vcxproj" (default target) (3) ->
 "C:\Users\archbox\Desktop\winapi-cmake\build2\winver.vcxproj" (default target) (8) ->
   C:\Users\archbox\Desktop\winapi-cmake\src\windowsVersion.cpp(30): warning C4996: 'GetVersionExA': was declared deprecated [C:\Users\archbox\Desktop\winapi-cmake\build2\winver.vcxproj]

Compilation Results:

$ tree /f bin

Folder PATH listing
Volume serial number is 00000244 CEFD:3D70
C:\USERS\ARCHBOX\DESKTOP\WINAPI-CMAKE\BIN
    base64.exe
    guiBasic1.exe
    guiBasicNOWinmain.exe
    winhttp.exe
    winver.exe

No subfolders exist

winapi-snippets-cmake's People

Contributors

caiorss avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.