• XSS.stack #1 – первый литературный журнал от юзеров форума

how to compile C program for all windows versions

you have to tell that to linker via:
#pragma comment(linker, "/subsystem:windows,5.01")

you have to use win_xp sdk or you have not to use CRT, SDL, exceptions and other stuff that loads functions in export table that might not be in win xp or win7, so that you have to parse all the corresponding functions dynamically from kernel32.dll, ntdll.dll and others.

take note of api changes during win xp - win 7 - win 10, u need to handle all the cases of that changes via looking msdn documentation.

if you need to use STL containers or strlen or something like this, you have to write them from scratch, own string, own vector, own memory management, own algorithms, own helpers in case you aren't using win_xp sdk
 
Пожалуйста, обратите внимание, что пользователь заблокирован
you have to tell that to linker via:
#pragma comment(linker, "/subsystem:windows,5.01")

you have to use win_xp sdk or you have not to use CRT, SDL, exceptions and other stuff that loads functions in export table that might not be in win xp or win7, so that you have to parse all the corresponding functions dynamically from kernel32.dll, ntdll.dll and others.

take note of api changes during win xp - win 7 - win 10, u need to handle all the cases of that changes via looking msdn documentation.

if you need to use STL containers or strlen or something like this, you have to write them from scratch, own string, own vector, own memory management, own algorithms, own helpers in case you aren't using win_xp sdk
why does everything need to be so fucking complicated in C, goddamn
 
Пожалуйста, обратите внимание, что пользователь заблокирован
why does everything need to be so fucking complicated in C, goddamn
You can try Mingw instead. It can compile executables that runs on XP out of the box, it has inline asm on X64 targets and quite a few interesting language extensions.
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх