linux.h help?

Hi, i use windows.h to make my hack for a quite famous game. This game is available on linux too, so i want to port my hacks on linux. The problem is, visual studio cant find linux.h. Someone please can tell me how to get it?
Are you just assuming that your Win32 code will become magically portable to Linux if you change <windows.h> to <linux.h>? Sorry, but that's not quite how it works. You'll need to figure out the Linux-equivalent functions for your window functions, and include the appropriate headers for those functions. And there probably won't always be corresponding functions for Linux. It will take a lot of effort to convert a heavily Win32 API code to Linux.

https://stackoverflow.com/questions/7317523/what-should-i-use-instead-of-windows-h-in-linux

You'll also need to compile for Linux. Visual Studio is for Windows, but I think it can do cross compilation for linux; however, I do not have experience in this. I suggest trying out a virtual machine with a Linux OS loaded on it, or load a Linux OS from USB, such as Ubuntu or Linux Mint.
Last edited on
Ganado is right on the mark. You may want to look up "virtual machine", "Ubuntu", "VmPlayer". For example you may want to create a Linux environment on your Windows machine by installing Ubuntu operating system (.iso). VMWare player will install the .iso file -- which is quite large ~1.39GB and will launch the new Ubuntu OS from there initially then later you will have to logon to Ubuntu like any other OS. Make sure that any virtualization technology your processor might have is enabled for virtualization otherwise you will run into problems.

Ubuntu and VMWare are only as few examples; not endorsements.

BTW you can download Visual Studio 2017 under a single developer license.
It is ambitiously trying its cross compiler between Windows C++ and a hosted Linux system and taking advantage of shared resources.
Last edited on
https://en.wikipedia.org/wiki/Windows.h

"Windows API" is not part of C or C++ languages. It is OS specific interface. Other OS are quite different.
Oh ok, thanks all.
Topic archived. No new replies allowed.