NT3.51 and Win95 InterlockedCompareExchange

General FreeBASIC programming questions.
Post Reply
RockTheSchock
Posts: 252
Joined: Mar 12, 2006 16:25

NT3.51 and Win95 InterlockedCompareExchange

Post by RockTheSchock »

the newer versions of fbc define InterlockedCompareExchange. In the german forum there was a little complain that fbc cant be used with older windows versions like nt 3.51. If it's only this point perhaps there could be made a patch based on this suggestion for gcc:

http://sourceforge.net/mailarchive/foru ... ingw-dvlpr

or is there another way arround, compiling fbc to work with nt3.51

I only found the function declaration of InterlockedCompareExchange in the source, but no place where it is actually used. What happens if the declarations are removed from winbase.bi and winddk.bi ?
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: NT3.51 and Win95 InterlockedCompareExchange

Post by dkl »

An update on this issue:

In FreeBASIC-0.90.1-win32, the crt2.o/dllcrt2.o use InterlockedCompareExchange@12, causing every .exe/.dll produced to depend on that function. These crt2.o/dllcrt2.o files are coming from the MinGW-w64 toolchain I used when making the 0.90.1 release.

Now however, for the new release, I'm using a new (up-to-date) MinGW-w64 toolchain, and this issue seems to be gone - no more uses of InterlockedCompareExchange@12. It seems like the MinGW-w64 runtime was changed/fixed since last year in this aspect.

Anyways, it seems like this issue should be fixed with the next FB release.
Post Reply