Avoid .def-file usage.

This commit is contained in:
Andrey Akhmichin 2021-06-14 01:35:35 +05:00
parent 3f6ab0b2fd
commit 6055d3d3eb
3 changed files with 5 additions and 12 deletions

View File

@ -113,7 +113,7 @@ set LIBS=user32.lib
set OUTNAME=hl.dll set OUTNAME=hl.dll
set DEBUG=/debug set DEBUG=/debug
cl %DEFINES% %LIBS% %SOURCES% %INCLUDES% -o %OUTNAME% /link /dll /out:%OUTNAME% %DEBUG% /def:".\hl.def" cl %DEFINES% %LIBS% %SOURCES% %INCLUDES% -o %OUTNAME% /link /dll /out:%OUTNAME% %DEBUG%
echo -- Compile done. Cleaning... echo -- Compile done. Cleaning...

View File

@ -43,8 +43,8 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
return TRUE; return TRUE;
} }
// stdcall for win32 // cdecl for win32
#define EXPORT2 WINAPI #define EXPORT2 WINAPIV
#else #else
#define EXPORT2 #define EXPORT2
#endif #endif

View File

@ -10,15 +10,8 @@ def options(opt):
return return
def configure(conf): def configure(conf):
if conf.env.COMPILER_CC == 'msvc': # stub
# hl.def removes MSVC function name decoration from GiveFnptrsToDll on Windows. return
# Without this, the lookup for this function fails.
hlDefNode = conf.path.find_resource("./hl.def")
if hlDefNode is not None:
conf.env.append_unique('LINKFLAGS', '/def:%s' % hlDefNode.abspath())
else:
conf.fatal("Could not find hl.def")
def build(bld): def build(bld):
source = bld.path.parent.ant_glob([ source = bld.path.parent.ant_glob([