how to use <Windows.h> c++

maromaro

New Member
Credits
0
Hello can someone help me please, i wrote some code in my win10 machine including Windows.h (API) an i did use some functions from it, but now i want to compile it in my Linux machine, But i don't know how, i tried using winegcc but i don't know what i need or what flags to use and the compiler can't find the Windows header file.
 


maromaro

New Member
Credits
0
Steps to Use :
1. sudo apt-get install g++-mingw-w64 (for minGW)
2. Then copy libgcc_s_sjlj-1.dll (To the project Dir)
in my case : cp /usr/lib/gcc/i686-w64-mingw32/7.3-win32/libgcc_s_sjlj-1.dll .
-Then copy libstdc++-6.dll (To the project Dir)
in my case : cp /usr/lib/gcc/i686-w64-mingw32/7.3-win32/libstdc++-6.dll .
3.Download w32api zip from te web site then unzip it in the working Dir.
4. COMPILE!!!!
ex : /usr/bin/i686-w64-mingw32-g++ -I w32api/include/ -L w32api/lib/ main.cpp
 

jglen490

Active Member
Credits
656
So it works, correct? And produces a compiled object that is a Windows-like thing, except that it's Linux, also correct?
 


Members online


Top