Mon 09/11/2017|17:48:13.29>g++ -m64 -O2 -static -lkernel32 -o 64\someexe.exe somesrc.cpp othersrc.cpp
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o:crtexe.c:(.text+0x1fd): relocation truncat
ed to fit: R_X86_64_PC32 against symbol `__imp_Sleep' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../
../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01200.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o:crtexe.c:(.text+0x285): relocation truncat
ed to fit: R_X86_64_PC32 against symbol `__imp_SetUnhandledExceptionFilter' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w6
4-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01187.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o:crtexe.c:(.text+0x2b3): relocation truncat
ed to fit: R_X86_64_PC32 against symbol `__mingw_winmain_hInstance' defined in COMMON section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/
6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o:crtexe.c:(.text+0x323): relocation truncat
ed to fit: R_X86_64_PC32 against symbol `__mingw_winmain_lpCmdLine' defined in COMMON section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/
6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64/crt2.o:crtexe.c:(.text+0x495): relocation truncat
ed to fit: R_X86_64_PC32 against symbol `__imp_GetStartupInfoA' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.
4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs00628.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/64/crtbegin.o:cygming-crtbegin.c:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 a
gainst symbol `__imp_GetModuleHandleA' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-
mingw32/lib/../lib64\libkernel32.a(dywfs00549.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/64/crtbegin.o:cygming-crtbegin.c:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 a
gainst symbol `__imp_GetProcAddress' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mi
ngw32/lib/../lib64\libkernel32.a(dywfs00599.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01334.o):(.text+0x2): relocati
on truncated to fit: R_X86_64_PC32 against symbol `__imp___C_specific_handler' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686
-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01334.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01200.o):(.text+0x2): relocati
on truncated to fit: R_X86_64_PC32 against symbol `__imp_Sleep' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.
4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01200.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01187.o):(.text+0x2): relocati
on truncated to fit: R_X86_64_PC32 against symbol `__imp_SetUnhandledExceptionFilter' defined in .idata$5 section in T:/sjlj64032/mingw32/bin/../lib/g
cc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs01187.o)
T:/sjlj64032/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.4.0/../../../../i686-w64-mingw32/lib/../lib64\libkernel32.a(dywfs00628.o):(.text+0x2): addition
al relocation overflows omitted from the output
collect2.exe: error: ld returned 1 exit status
Mon 09/11/2017|17:48:54.18>g++ -m32 -O2 -static -lkernel32 -o 32\someexe.exe somesrc.cpp othersrc.cpp
#include <iterator>
#include <exception>
#include <algorithm>
#include <fstream>
#include <ios>
#include <iostream>
#include <vector>
#include <streambuf>
#include <sstream>
#include <initializer_list>
#include <string>
#include <cstdint>
#include <stdlib.h>
#include <cinttypes>
#include <string.h>
#include <stdio.h>
#include <regex>
#include <cctype>
#include <windows.h>
#include <FileAPI.h>
#include <WinBase.h>
#if !defined(_MSC_VER)
#include <WinNT.h>
#endif
this is the 32-bit sjlj 6.4.0 posix compiler. is it somehow better at doing win32 threads than the 64-bit-host win32 version?
Mon 09/11/2017|17:49:33.21>g++ --version
g++ (i686-posix-sjlj-rev0, Built by MinGW-W64 project) 6.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Last edit: Jim Michaels 2017-09-12
Cross compiling (which is what this is) -m32 from an x64 compiler or -m64 from an x86 compiler is not supported. There is experimental stuff I put in a few years ago but unfortnately there was an issue with copyright so it could not be put in to the mainline gcc (and binutils) trunks. Not a bug; feature request.
Is the copyright issue still an issue?
On Thu, Oct 5, 2017 at 12:47 AM, Doug Semler tpaxatb@users.sf.net wrote: