Skip to content

Instantly share code, notes, and snippets.

@Shivam60
Shivam60 / boost-windows.md
Last active January 26, 2025 22:12 — forked from sim642/boost-windows.md
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Ensure GCC is working as expected.

  1. Open Command Prompt.
  2. Run g++ --version.
  3. If the output contains g++ version number then GCC should be set up properly to run from command line and you can continue.

Boost installation

  1. open MSYS2 MINGW32
  2. install boost by using the command pacman -S mingw-w64-x86_64-boost
@sonictk
sonictk / CMakeLists.txt
Created August 30, 2018 22:40
cmake target compile options
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using GCC
set(CMAKE_VERBOSE_MAKEFILE 1)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS "Bits64_;UNIX;_BOOL;LINUX;FUNCPROTO;_GNU_SOURCE;LINUX_64;REQUIRE_IOSTREAM")
set(GCC_COMPILE_OPTIONS "-m64;-fPIC;-fno-strict-aliasing;-Wall;-Wno-multichar;-Wno-comment;-Wno-sign-compare;-funsigned-char;-pthread;-Wno-deprecated;-Wno-reorder;-ftemplate-depth-64;-fno-gnu-keywords;-std=c++0x;-Winline")
set(GCC_COMPILE_DEBUG_OPTIONS "${GCC_COMPILE_OPTIONS};-ggdb;-O0")
@santisbon
santisbon / Search my gists.md
Last active April 4, 2025 21:29
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@creative-quant
creative-quant / str_const.h
Created April 14, 2016 12:00
str_const from Scott Schurr - 2012.cppnow.org -> schurr_cpp11_tools_for_class_authors.pdf
class str_const { // constexpr string
private:
const char* const p_;
const std::size_t sz_;
public:
template<std::size_t N>
constexpr str_const(const char (&a)[N]) : // ctor
p_(a), sz_(N - 1) {
}
constexpr char operator[](std::size_t n) { // []
@liam-middlebrook
liam-middlebrook / GLDebugMessageCallback.c
Last active February 7, 2025 14:17
GL Debug Output Message Callback Guide
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or distribute
// this software, either in source code form or as a compiled binary, for any
// purpose, commercial or non-commercial, and by any means.
//
// In jurisdictions that recognize copyright laws, the author or authors of this
// software dedicate any and all copyright interest in the software to the
// public domain. We make this dedication for the benefit of the public at large
// and to the detriment of our heirs and successors. We intend this dedication