Merge pull request #68 from Kopromaster/main

Windows: support of GCC (MinGW)
This commit is contained in:
drmortalwombat 2024-06-22 13:56:57 +02:00 committed by GitHub
commit 9d890228bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -17,7 +17,10 @@ else
linklibs = -lpthread linklibs = -lpthread
else else
# MSVC
linklibs = -lrt -lpthread linklibs = -lrt -lpthread
# MinGW
#linklibs = -lversion -lpthread
endif endif
endif endif
@ -31,7 +34,7 @@ endif
rm -f $@.$$$$ rm -f $@.$$$$
../bin/oscar64 : $(objects) ../bin/oscar64 : $(objects)
$(CXX) $(CPPFLAGS) $(linklibs) $(objects) -o ../bin/oscar64 $(CXX) $(CPPFLAGS) $(objects) $(linklibs) -o ../bin/oscar64
.PHONY : clean .PHONY : clean
clean : clean :

View File

@ -567,16 +567,19 @@ int main(int argc, const char** argv)
{ {
#if 1 #if 1
#ifdef _WIN32 #ifdef _WIN32
#ifndef __GNUC__
#ifndef _DEBUG #ifndef _DEBUG
__try __try
{ {
#endif #endif
#endif #endif
#endif
#endif #endif
return main2(argc, argv); return main2(argc, argv);
#if 1 #if 1
#ifdef _WIN32 #ifdef _WIN32
#ifndef __GNUC__
#ifndef _DEBUG #ifndef _DEBUG
} }
__except (seh_filter(GetExceptionCode(), GetExceptionInformation())) __except (seh_filter(GetExceptionCode(), GetExceptionInformation()))
@ -586,4 +589,5 @@ int main(int argc, const char** argv)
#endif #endif
#endif #endif
#endif #endif
#endif
} }