???????Windows??Linux???????????
???????????? ???????[ 2012/10/17 9:58:36 ] ????????
????3??????????????????
????Windows??Linux???????????????????????μ?????????????????????????????滹????????????????????????????в?????
??????1???????????д????Windows???μ????????????PE????????????????DllMain??????????????????????????????????????????_declspec??dllexport????????Linux?μ?gcc????????????????ELF???????????????????????????????????????????д??????
??????2????????????windows?????棬?з???????????????????????????дmakefile?????????linux???棬?????????????дmakefile??????????????????????makefile??д????????????Linux?????????????
??????3?????????÷??棬Windows??Linux?????±????????????????????????????????????????÷????????????
??????4????????????????????Windows?У??????????????????в?DLL???????????????????????з????dumpbin???VC++?????е?DEPENDS??????Linux???????????nm?????????????????????ldd?????????????????????????
??????5?????????????????????????????????????????????????????????á?????????????????????????????????????????????????????汾??
????4??????????????
?????????????????????ж??????????????????????????Windows??VC++???????????????????????????VC++??????λ????????????vi??gcc????????????????????ж?????????????
???????gcc???????????VC++??????????????????VC++????????κξ????????????gcc??????????????????????????gcc?в???-w???????????
???????????????????????????????????顣
??????1??????????????ж??????????????????C/C++?????У???????????????????????????C/C++?????????Сд????????????????Linux?????????????Сд????????ext2???????????????Сд??У??????????????????Windows???棬??????Сд???????????
??????2??????????е?????????Windows???У?????????windows.h??????????????????????????????winsock..h????????????????Linux????????????ЩWindows?????е?????????Щwindows????????????????????Linux????????????????????
??????3???????????VC++?????????е????????????__int16??__int32??TRUE??SOCKET???gcc??????????????????????????????windows.h??basetypes.h?ж???Щ??????ж??????臨???????????У?????Linux?а???????????????罫???????????SOCKET???int??
??????4????????VC++?о????????C??????в???????????BOOL??BYTE??DWORD??__asm???????????????????????????????????????????????????#ifdef ??#endif?LINUX??WINDOWS??д?????汾??
??????5????????????????????????????C/C++?????д????????????????????±?д?????????????????ú??????????????????????????亯??????÷?????????Linux?????????????????У???close????????????windows???????μ?closesocket?????????????????????????Linux???????????????????????open??fopen???????????????????????÷???ο?????[2]??
??????6??makefile???д????windows?????????VC++??????????????????gcc???????????дmakefile?????????????VC++?????makefile?????????????????????????????????-shared?????????????????????????????????????????????????-lm??
??????7???????Щ?????????
?????? ??????????????????????????д?????????????????????????????裬?????????????У??????????????????????????????Щ??
?????? ??Linux?У?????????????????????????顢???????????????????????????????????д???????????????????д??????????????????????????????????????????д??
?????? ????????????????????????????????????棬?????????????????????????????malloc???????????????????????????????????????????????linux?????windows??????????????????????д??????????????н??н???????????????е????????????
?????? ·???????????Linux????“/”????Windows????“”?????windows??Linux???????????·????????
?????? ????????????檔?????????????в?????????????????????????
????5????????
????????????????windows??Linux???????????÷??????????д????????????????????????????????????????????????÷???????????????????????????飬???????VC++?????Windows??????????Linux?μ??????????????????????????????????????????????????????У???????????????棬???????????????????????????渴???????????????????????????????????????????????????ɡ?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11