tom-plants / redalert3networkfix Goto Github PK
View Code? Open in Web Editor NEWfix Multiple network card run on RedAlert3
fix Multiple network card run on RedAlert3
你好,我在尝试编译时出现一下问题,能帮忙看下是什么错误吗?感激(另外希望能提供编译好的程序,这样会方便很多,我们用 n2n 联机失败,估计是作者说的多网卡问题)
$ gcc -I D:\迅雷下载\redalert3networkfix-master\disasm-lib -I D:\迅雷下载\redalert3networkfix-master\mhook-lib D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:47:31: error: ‘::main’ must return ‘int’
47 | __declspec(dllexport) void main()
| ^~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp: In function ‘int main()’:
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:49:67: warning: passing NULL to non-pointer argument 4 of ‘int MessageBoxA(HWND, LPCSTR, LPCSTR, UINT)’ [-Wconversion-null]
49 | MessageBox(NULL, _T("▒Ѿ▒ע▒▒▒ɫ▒▒▒▒3"), _T("▒▒ʾ"), NULL);
| ^~~~
In file included from /usr/include/w32api/windows.h:72,
from /usr/include/w32api/WinSock2.h:23,
from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:1:
/usr/include/w32api/winuser.h:3711:83: note: declared here
3711 | WINUSERAPI int WINAPI MessageBoxA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType);
| ~~~~~^~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:60:52: error: invalid conversion from ‘SOCKET ()(int, int, int)’ {aka ‘long long unsigned int ()(int, int, int)’} to ‘PVOID’ {aka ‘void*’} [-fpermissive]
60 | Mhook_SetHook((PVOID*)&TrueSocket, Hook_socket);
| ^~~~~~~~~~~
| |
| SOCKET ()(int, int, int) {aka long long unsigned int ()(int, int, int)}
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID ppSystemFunction, PVOID pHookFunction);
| ~~~~~~^~~~~~~~~~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:61:53: error: invalid conversion from ‘int ()(SOCKET, const sockaddr*, int)’ {aka ‘int ()(long long unsigned int, const sockaddr, int)’} to ‘PVOID’ {aka ‘void*’} [-fpermissive]
61 | Mhook_SetHook((PVOID*)&TrueConnect, Hook_connect);
| ^~~~~~~~~~~~
| |
| int ()(SOCKET, const sockaddr, int) {aka int ()(long long unsigned int, const sockaddr, int)}
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID ppSystemFunction, PVOID pHookFunction);
| ~~~~~~^~~~~~~~~~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:62:59: error: invalid conversion from ‘hostent ()(const char)’ to ‘PVOID’ {aka ‘void*’} [-fpermissive]
62 | Mhook_SetHook((PVOID*)&TrueGetHostByName, HOOK_gethostbyname);
| ^~~~~~~~~~~~~~~~~~
| |
| hostent* ()(const char)
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID ppSystemFunction, PVOID pHookFunction);
| ~~~~~~^~~~~~~~~~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:63:50: error: invalid conversion from ‘int ()(SOCKET, const sockaddr*, int)’ {aka ‘int ()(long long unsigned int, const sockaddr, int)’} to ‘PVOID’ {aka ‘void*’} [-fpermissive]
63 | Mhook_SetHook((PVOID*)&TrueBind, HOOK_bind);
| ^~~~~~~~~
| |
| int ()(SOCKET, const sockaddr, int) {aka int ()(long long unsigned int, const sockaddr, int)}
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID *ppSystemFunction, PVOID pHookFunction);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.