Page 1 of 1

Switching between compilers

Posted: Sat Oct 10, 2020 9:43 am
by Gabor Szots
I have GCC 8 and GCC 10 installed, my path environment variable containing both. Lately I did my compilations using GCC 10 but yesterday I switched (by promoting the path to GCC 8 in the path variable) to GCC 8 because that produces faster executables.
The surprise came when I wanted to run an engine (Halogen 7) prviously compiled using GCC 10, and I got the error message 'the access point to the process cannot be found in the DLL' (this is an approximate translation, I use Hungarian Windows). I tried another engine compiled using GCC 10 and the result was the same. I switched back to GCC 10 (again via the path variable) and the errors went away.
So it seems to me that the engines try to use a DLL which can be found in the GCC 10 installation but not in the GCC 8 one. Is that comprehensible?
The strange thing is that the opposite seems to be not true: if I compile Halogen 7 using GCC 8 then switch paths, I don't get an error message.

I'd be grateful if someone could comment on this issue.

Re: Switching between compilers

Posted: Sat Oct 10, 2020 2:18 pm
by mar
I assume you use MinGW on Windows.
have to tried to link the CRT statically? -static might work

Re: Switching between compilers

Posted: Sat Oct 10, 2020 2:58 pm
by Gabor Szots
mar wrote: Sat Oct 10, 2020 2:18 pm I assume you use MinGW on Windows.
have to tried to link the CRT statically? -static might work
GCC 8 is installed in e:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\
GCC 10 is installed under in e:\msys64\mingw64\

I switched the path between e:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\ and e:\msys64\mingw64\bin\.

I never use -static, I assumed it is only needed if I want to publish my exes so that they work on other computers as well.

Re: Switching between compilers

Posted: Mon Oct 12, 2020 3:08 pm
by Kieren Pearson
Just to confirm, this isn't an issue with Halogen specifically? I wasn't sure from what you've written.