Skip to content

Instantly share code, notes, and snippets.

@sawaYch
Last active October 26, 2018 17:51
Show Gist options
  • Save sawaYch/f5224f30c7c34bd54a7b43206c9b9b2f to your computer and use it in GitHub Desktop.
Save sawaYch/f5224f30c7c34bd54a7b43206c9b9b2f to your computer and use it in GitHub Desktop.
C++ Boost & Mysys

Simple makefile for compiling cpp with Boost lib

Install Boost using Mysys2

# pacman -S mingw-w64-x86_64-boost

Just few line

all:./main.cpp
	g++ -static-libstdc++ -static-libgcc -Wl,-Bstatic,--whole-archive -lpthread \
    -Wl,--no-whole-archive -L/mingw64/lib -Wl,-Bstatic \
    -o ./main.exe ./main.cpp -lboost_system-mt -lws2_32 -lwsock32

Reference

link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment