Q:

How to link vcpkg boost with MinGW

I have a code that works fine under VS 2017 Community. Now I can't use it any longer and I had to switch to MinGW.
I compiled the boost library with MinGW and then I used the generated libraries to link my program:

Lib/libboost_program_options-mgw81-mt-d-x64-1_69.a (static debug library)
Lib/libboost_program_options-mgw81-mt-x64-1_69.a (static release library)

Here is the command I'm using:  
g++.exe -DNDEBUG -DASCII -Wall -std=c++17 -static-libgcc -static-libstdc++ -L lib  -o prog.exe *.o -lboost_program_options-mgw81-mt-x64-1_69

and this is what I get:
main.o:main.cpp:(.text+0x203): undefined reference to `__imp__ZN5boost15program_optionslsERSoRKNS0_19options_descriptionE'
main.o:main.cpp:(.text+0x3f9): undefined reference to `__imp__ZN5boost15program_options19options_description21m_default_line_lengthE'
main.o:main.cpp:(.text+0x406): undefined reference to `__imp__ZN5boost15program_options19options_description21m_default_line_lengthE'  
... (more lines like these)  

All the undefined reference errors are related only to the boost::program_options calls (But I'm not using any other boost library).
I have tried:

Building Boost source With MinGW and linking to the generated static library. 
Using the boost (.lib and .DLL) that I had on my computer with vcpkg.
All the tries gave the same errors.
How can I fix this ?
Environment
gcc 8.1.0
boost 1.69
Windows 10 17134  

A:

Problem:
It seems that the headers included from vcpkg (${vcpkgRoot}/installed/x64-static/include) do not work with MinGW.
The original command g++.exe -DNDEBUG -I'c:/vcpkg/installed/x64-windows-static/include' -L . main.cpp -lboost_program_options-vc140-mt doesn't work. Here I'm using the generated boost_program_options-vc140-mt.lib file and headers with vcpkg.
I tried to build Boost with MinGW and used the .a file: g++.exe -DNDEBUG -I'c:/vcpkg/installed/x64-windows-static/include' -L . main.cpp -lboost_program_options-mgw81-mt-x64-1_69 didn't work neither.
But This command worked g++.exe -DNDEBUG -I'c:/boost-mingw/boost_1_69_0' -L . .\main.cpp -lboost_program_options-mgw81-mt-x64-1_69
So that means the headers are specific to Visual Studio..  

