Switching between compilers

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Switching between compilers

Post 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.
Gabor Szots
CCRL testing group
mar
Posts: 2559
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Switching between compilers

Post by mar »

I assume you use MinGW on Windows.
have to tried to link the CRT statically? -static might work
Martin Sedlak
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Switching between compilers

Post 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.
Gabor Szots
CCRL testing group
Kieren Pearson
Posts: 70
Joined: Tue Dec 31, 2019 2:52 am
Full name: Kieren Pearson

Re: Switching between compilers

Post by Kieren Pearson »

Just to confirm, this isn't an issue with Halogen specifically? I wasn't sure from what you've written.