I'm having some trouble when returning symbols from C++ code. I made a small example that illustrates the problem.
We export the following function:
extern "C" __declspec(dllexport) K getSym(K x) {
return ks((S)"sym");
}
And then call it from Q:
q)asdf:(`our_dll 2:(`getSym;1))[1]
q)asdf
`sym
q)asdf = `sym
0b
q)asdf = `$string asdf
0b
q)0N!asdf
`sym
`sym
q)(string asdf) = (string `sym)
111b
Why are the two values unequal?
This is 32-bit KDB+ 3.2.