w64_qserver for R

Hi all,

I tried to follow the instruction to compile w64_qserver for R (http://code.kx.com/wsvn/code/cookbook\_code/r/w64\_qserver/?#aab6bb31e13bc2816b2db913b3fc5017c), but kept getting the following errors.

D:\Projects\KDB+\w64_qserver>gcc -c base.c -I. -I “C:/R/R-3.3.2/include” -D KXVER=3

In file included from base.c:16:0:

./k.h:88:0: warning: “isnan” redefined

 #define isnan _isnan

 ^

In file included from C:/R/R-3.3.2/include/R.h:48:0,

                 from base.c:10:

C:/RTOOLS/MINGW_32/i686-w64-mingw32/include/math.h:480:0: note: this is the location of the previous definition

 #define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \

 ^

D:\Projects\KDB+\w64_qserver>gcc -Wl,–export-all-symbols -shared -o qserver.dll base.o c.o R.dll -lws2_32

c.o: file not recognized: File format not recognized

collect2.exe: error: ld returned 1 exit status

I did the same for w32_qserver for R (http://code.kx.com/wsvn/code/cookbook\_code/r/w32\_qserver/?#adbc9418b31ab823417f1b088f9006e69) and it works fine.

I wonder whether c.o is indeed corrupted. Is there another place I can download c.o? Thanks a lot!

Hi George,

did you try this file, the 64bit version of c.o?

http://code.kx.com/wsvn/code/cookbook_code/r/w64_qserver/c.o?op=dl&rev=1916&peg=1916

thanks

Thanks, Chris! Yes, I did. 
It turned out that c.o is fine, the problem was due to the compiler I used.

The new RTools has two versions of compiler for x64 and i386 respectively. 

I had to set my path to switch to the 64-bit compiler, which fixed the error.

Regards,

George

great! Glad it’s working for you, and thanks for sharing the fix.