I have a .dll library on Windows which I compiled using mingw g++ on the command line with various flags to optimize it, but I need to link it to my project so that the .dll is required to run the compiled .exe (as far as I understand, this is implicit/dynamic linking). This is originally a macOS project, so I can't figure out how to link it to my Visual Studio project since it seems I need a .lib file.
The way I create the .dll file is by inputting this command in cmd inside the lib folder :
g++ -shared -DNDEBUG -IC:\Users\luis.lopez\Documents\libraries\eigen\ -march=native -ftree-vectorize -ffast-math -fstrict-aliasing -O3 -fomit-frame-pointer -fopenmp -o libfoo.dll foolibrary.cpp
Is there a way for me to create the .lib file while maintaining these compilation flags?