Merge branch 'link-with-exchndl' into 'master'

Link with exchndl, instead of dynamically loading it.

See merge request KartKrew/Kart-Public!230
This commit is contained in:
Sal 2020-09-19 15:42:00 -04:00
commit 1906bf3817
5 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,39 @@
/*
* Copyright 2002-2015 Jose Fonseca
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#pragma once
#include <windows.h>
// Set the unhandled exception handler.
// Must be called when exchndll.dll is statically loaded (as opposed to loaded
// dynamically via LoadLibrary)
EXTERN_C VOID APIENTRY
ExcHndlInit(void);
// Override the report file name.
//
// Default is prog_name.RPT, in the same directory as the main executable.
//
// You can also pass "-" for stderr.
EXTERN_C BOOL APIENTRY
ExcHndlSetLogFileNameA(const char *szLogFileName);

Binary file not shown.

Binary file not shown.

View File

@ -58,6 +58,10 @@ char logfilename[1024];
#endif
#endif
#if defined (_WIN32)
#include "exchndl.h"
#endif
#if defined (_WIN32)
#include "../win32/win_dbg.h"
typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID);
@ -170,7 +174,7 @@ int main(int argc, char **argv)
)
#endif
{
LoadLibraryA("exchndl.dll");
ExcHndlInit();
}
}
#ifndef __MINGW32__

View File

@ -60,6 +60,12 @@ else
endif
endif
ifndef MINGW64
CPPFLAGS+=-I../libs/drmingw/include
LDFLAGS+=-L../libs/drmingw/lib/win32
LIBS+=-lmgwhelp -lexchndl
endif
# name of the exefile
ifdef SDL
EXENAME?=srb2kart.exe