0

I am going through the InterfacingWithC cookbook from Kx, and trying to create a mixed list of two symbols, then append a symbol to it. This keeps crashing my kdb process when I load it in a shared object. So this simple code crashes

K msgs =  knk(2, ktn(KS, 0), ktn(KS, 0));
K syms=kK(msgs)[0];
S sym=ss("IBM");
js(&syms, sym); <-- this line seg faults

But this code not using a list works just fine

K syms=ktn(KS,0);
S sym=ss("IBM");
js(&syms,sym);

The way I understand it is that knk gives me a mixed list, and I can access elements of that list using kk function. What am I missing here?

1 Answer 1

1

Found the answer. I was using KXVER version 3 when my kdb version/libs/includes were version 2. I changed that to two and it works fine now. In case it helps someone.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.