Could somebody help me in getting some steps in calling q from C++. Iam a learner and some direction is very much appreciated. I got qevaluation copied onto unbuntu. I want to link that with C++ fromeclipse. Thanks for your time and help.
Hello,
This is a good place to start:
https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC?(user/pass: anonymous/anonymous.
Regards,
Fintan.
Thank you Fintan. I started to write a program, it seems it needs tolink with c.o file, how can I download that object file, there is nooption to download this file from any location. Is there a way?.Thanks for letting me know.On Mar 14, 5:41?am, Fintan Quill <fint…> wrote:> Hello,>> This is a good place to start:>> https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC(user/pass:> anonymous/anonymous.>> Regards,>> Fintan.>> On Sun, Mar 13, 2011 at 5:31 AM, RB <ram_bo…> wrote:> > Could somebody help me in getting some steps in calling q from C++. I> > am a learner and some direction is very much appreciated. I got q> > evaluation copied onto unbuntu. I want to link that with C++ from> > eclipse. Thanks for your time and help.>> > –> >
Submitted via Google Groups</ram_bo…></fint…>
On 16 March 2011 21:19, RB <ram_bollu> wrote:> Thank you Fintan. I started to write a program, it seems it needs to> link with c.o file, how can I download that object file, there is no> option to download this file from any location. Is there a way?.> Thanks for letting me know.>Here is for linux 32-bit:http://kx.com/q/l32/Regards,Kamil</ram_bollu>
Thanks Kamil. It is just opening the file and not allowing medownload.I am not sure I can copy the object file by select all and prepare mylocal copy.It is bit strange to link with c.o, an object file rather than .so.Thanks for letting me know.On Mar 17, 1:22?am, Kamil Ja?kiewicz <jaskiewicz.ka…>wrote:> On 16 March 2011 21:19, RB <ram_bo…> wrote:> Thank you Fintan. I started to write a program, it seems it needs to> > link with c.o file, how can I download that object file, there is no> > option to download this file from any location. Is there a way?.> > Thanks for letting me know.>> Here is for linux 32-bit:http://kx.com/q/l32/>> Regards,> Kamil</ram_bo…></jaskiewicz.ka…>
On 22 March 2011 19:18, RB <ram_bollu> wrote:
> Thanks Kamil. It is just opening the file and not allowing me
> download.
> I am not sure I can copy the object file by select all and prepare my
> local copy.
Just use “Save Link As” option in your web browser.
> It is bit strange to link with c.o, an object file rather than .so.
I haven’t seen shared libraries for linux (for w32 and w64 you have
c.dll). But you can link your program statically with c.o (then you
don’t need shared libraries in your system, all required functions are
already in your program).
> Thanks for letting me know.
>
> On Mar 17, 1:22=C2=A0am, Kamil Ja=C5=9Bkiewicz <jaskiewicz.ka…>m>
> wrote:
>> On 16 March 2011 21:19, RB <ram_bo…> wrote:> Thank you Fin=
tan. I started to write a program, it seems it needs to
>> > link with c.o file, how can I download that object file, there is no
>> > option to download this file from any location. Is there a way?.
>> > Thanks for letting me know.
>>
>> Here is for linux 32-bit:http://kx.com/q/l32/
>>
>> Regards,
>> Kamil
>
> –
>
Submitted via Google Groups</ram_bo…></jaskiewicz.ka…></ram_bollu>
Thank you Kamil. Progressed I guess. But I get new problems now:c.o: In function t1':c.c:(.text+0x1741): undefined reference to
pthread_create’/home/RB/c.o: In function ul':c.c:(.text+0x176c): undefined reference to
pthread_rwlock_unlock’/home/RB/c.o: In function wl':c.c:(.text+0x179c): undefined reference to
pthread_rwlock_wrlock’/home/RB/c.o: In function rl':c.c:(.text+0x17cc): undefined reference to
pthread_rwlock_rdlock’/home/RB/c.o: In function mi0':c.c:(.text+0x369e): undefined reference to
pthread_rwlock_init’c.c:(.text+0x36a6): undefined reference to pthread_mutexattr_init'c.c:(.text+0x36b6): undefined reference to
pthread_mutexattr_settype’collect2: ld returned 1 exit statussorry to take too much help from you.On Mar 17, 1:19?am, RB <ram_bo…> wrote:> Thank you Fintan. I started to write a program, it seems it needs to> link with c.o file, how can I download that object file, there is no> option to download this file from any location. Is there a way?.> Thanks for letting me know.>> On Mar 14, 5:41?am, Fintan Quill <fint…> wrote:>> > Hello,>> > This is a good place to start:>> >https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC(user/pass:> > anonymous/anonymous.>> > Regards,>> > Fintan.>> > On Sun, Mar 13, 2011 at 5:31 AM, RB <ram_bo…> wrote:> > > Could somebody help me in getting some steps in calling q from C++. I> > > am a learner and some direction is very much appreciated. I got q> > > evaluation copied onto unbuntu. I want to link that with C++ from> > > eclipse. Thanks for your time and help.>> > > –> > >
Submitted via Google Groups</ram_bo…></fint…></ram_bo…>
it needs to link with the pthread library
e.g.
gcc … -pthread
Thanks Charles, it worked.I wanted to print ‘a’ from below code to console like cout << a.Basically how can I access a as part of my C++ code.int c = khpu(“localhost”, 1234 ,“rb:rb”); // Connect to a Kdb+ serveron the localhost port 1234 . k(-c,“a:2+2”,(K)0);Thanks again.On Mar 24, 12:22?am, Charles Skelton <char…> wrote:> it needs to link with the pthread library>> e.g.>> gcc … -pthread>> On Wed, Mar 23, 2011 at 8:20 PM, RB <ram_bo…> wrote:> > Thank you Kamil. Progressed I guess. But I get new problems now:> > c.o: In function t1':> > c.c:(.text+0x1741): undefined reference to
pthread_create’> > /home/RB/c.o: In function ul':> > c.c:(.text+0x176c): undefined reference to
pthread_rwlock_unlock’> > /home/RB/c.o: In function wl':> > c.c:(.text+0x179c): undefined reference to
pthread_rwlock_wrlock’> > /home/RB/c.o: In function rl':> > c.c:(.text+0x17cc): undefined reference to
pthread_rwlock_rdlock’> > /home/RB/c.o: In function mi0':> > c.c:(.text+0x369e): undefined reference to
pthread_rwlock_init’> > c.c:(.text+0x36a6): undefined reference to pthread_mutexattr_init'> > c.c:(.text+0x36b6): undefined reference to
pthread_mutexattr_settype’> > collect2: ld returned 1 exit status>> > sorry to take too much help from you.>> > On Mar 17, 1:19 am, RB <ram_bo…> wrote:> > > Thank you Fintan. I started to write a program, it seems it needs to> > > link with c.o file, how can I download that object file, there is no> > > option to download this file from any location. Is there a way?.> > > Thanks for letting me know.>> > > On Mar 14, 5:41 am, Fintan Quill <fint…> wrote:>> > > > Hello,>> > > > This is a good place to start:>> > > >https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC(user/pass:> > > > anonymous/anonymous.>> > > > Regards,>> > > > Fintan.>> > > > On Sun, Mar 13, 2011 at 5:31 AM, RB <ram_bo…> wrote:> > > > > Could somebody help me in getting some steps in calling q from C++. I> > > > > am a learner and some direction is very much appreciated. I got q> > > > > evaluation copied onto unbuntu. I want to link that with C++ from> > > > > eclipse. Thanks for your time and help.>> > > > > –> > > > > You received this message because you are subscribed to the Google> > Groups> > > > > “Kdb+ Personal Developers” group.> > > > > To post to this group, send email to> > personal-kdbplus@googlegroups.com.> > > > > To unsubscribe from this group, send email to> > > > > personal-kdbplus+unsubscribe@googlegroups.com.> > > > > For more options, visit this group at> > > > >http://groups.google.com/group/personal-kdbplus?hl=en.>> > –> >
Submitted via Google Groups</ram_bo…></fint…></ram_bo…></ram_bo…></char…>
All below statements working fine, when I see the data from browser: int c = khpu(“localhost”, 1234 ,“vishist:vishist”); // Connect to aKdb+ server on the localhost port 1234 . k(-c,"d: name
salary! (tom
dickharry;30 30 35)",(K)0); k(-c,"f:flip d",(K)0); k(-c,"
f insert(rem;40)",(K)0);//insertBut, how to get data out from q to C++ so that I can use the data aspart of C++ code.Thanks for the help.On Mar 26, 10:59?pm, RB <ram_bo...> wrote:> Thanks Charles, it worked.> I wanted to print 'a' from below code to console like cout << a.> Basically how can I access a as part of my C++ code.>> int c = khpu("localhost", 1234 ,"rb:rb"); // Connect to a Kdb+ server> on the localhost port 1234 .> ? ? ? ? k(-c,"a:2+2",(K)0);>> Thanks again.>> On Mar 24, 12:22?am, Charles Skelton <char...> wrote:>> > it needs to link with the pthread library>> > e.g.>> > gcc .... -pthread>> > On Wed, Mar 23, 2011 at 8:20 PM, RB <ram_bo...> wrote:> > > Thank you Kamil. Progressed I guess. But I get new problems now:> > > c.o: In function
t1’:> > > c.c:(.text+0x1741): undefined reference to pthread_create'> > > /home/RB/c.o: In function
ul’:> > > c.c:(.text+0x176c): undefined reference to pthread_rwlock_unlock'> > > /home/RB/c.o: In function
wl’:> > > c.c:(.text+0x179c): undefined reference to pthread_rwlock_wrlock'> > > /home/RB/c.o: In function
rl’:> > > c.c:(.text+0x17cc): undefined reference to pthread_rwlock_rdlock'> > > /home/RB/c.o: In function
mi0’:> > > c.c:(.text+0x369e): undefined reference to pthread_rwlock_init'> > > c.c:(.text+0x36a6): undefined reference to
pthread_mutexattr_init’> > > c.c:(.text+0x36b6): undefined reference to `pthread_mutexattr_settype’> > > collect2: ld returned 1 exit status>> > > sorry to take too much help from you.>> > > On Mar 17, 1:19 am, RB <ram_bo…> wrote:> > > > Thank you Fintan. I started to write a program, it seems it needs to> > > > link with c.o file, how can I download that object file, there is no> > > > option to download this file from any location. Is there a way?.> > > > Thanks for letting me know.>> > > > On Mar 14, 5:41 am, Fintan Quill <fint…> wrote:>> > > > > Hello,>> > > > > This is a good place to start:>> > > > >https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC(user/pass:> > > > > anonymous/anonymous.>> > > > > Regards,>> > > > > Fintan.>> > > > > On Sun, Mar 13, 2011 at 5:31 AM, RB <ram_bo…> wrote:> > > > > > Could somebody help me in getting some steps in calling q from C++. I> > > > > > am a learner and some direction is very much appreciated. I got q> > > > > > evaluation copied onto unbuntu. I want to link that with C++ from> > > > > > eclipse. Thanks for your time and help.>> > > > > > –> > > > > > You received this message because you are subscribed to the Google> > > Groups> > > > > > “Kdb+ Personal Developers” group.> > > > > > To post to this group, send email to> > > personal-kdbplus@googlegroups.com.> > > > > > To unsubscribe from this group, send email to> > > > > > personal-kdbplus+unsubscribe@googlegroups.com.> > > > > > For more options, visit this group at> > > > > >http://groups.google.com/group/personal-kdbplus?hl=en.>> > > –> > >
Submitted via Google Groups</ram_bo…></fint…></ram_bo…></ram_bo…></char…></ram_bo…>
Could somebody experts over there help me please?.thanks a lot.On Mar 28, 11:08?pm, RB <ram_bo…> wrote:> All below statements working fine, when I see the data from browser:>> ? ? ? ? int c = khpu(“localhost”, 1234 ,“vishist:vishist”); // Connect to a> Kdb+ server on the localhost port 1234 .>> ? ? ? ? k(-c,"d: name
salary! (tom
dickharry;30 30 35)",(K)0);> ? ? ? ? k(-c,"f:flip d",(K)0);> ? ? ? ? k(-c,"
f insert(rem;40)",(K)0);//insert>> But, how to get data out from q to C++ so that I can use the data as> part of C++ code.>> Thanks for the help.>> On Mar 26, 10:59?pm, RB <ram_bo...> wrote:>> > Thanks Charles, it worked.> > I wanted to print 'a' from below code to console like cout << a.> > Basically how can I access a as part of my C++ code.>> > int c = khpu("localhost", 1234 ,"rb:rb"); // Connect to a Kdb+ server> > on the localhost port 1234 .> > ? ? ? ? k(-c,"a:2+2",(K)0);>> > Thanks again.>> > On Mar 24, 12:22?am, Charles Skelton <char...> wrote:>> > > it needs to link with the pthread library>> > > e.g.>> > > gcc .... -pthread>> > > On Wed, Mar 23, 2011 at 8:20 PM, RB <ram_bo...> wrote:> > > > Thank you Kamil. Progressed I guess. But I get new problems now:> > > > c.o: In function
t1’:> > > > c.c:(.text+0x1741): undefined reference to pthread_create'> > > > /home/RB/c.o: In function
ul’:> > > > c.c:(.text+0x176c): undefined reference to pthread_rwlock_unlock'> > > > /home/RB/c.o: In function
wl’:> > > > c.c:(.text+0x179c): undefined reference to pthread_rwlock_wrlock'> > > > /home/RB/c.o: In function
rl’:> > > > c.c:(.text+0x17cc): undefined reference to pthread_rwlock_rdlock'> > > > /home/RB/c.o: In function
mi0’:> > > > c.c:(.text+0x369e): undefined reference to pthread_rwlock_init'> > > > c.c:(.text+0x36a6): undefined reference to
pthread_mutexattr_init’> > > > c.c:(.text+0x36b6): undefined reference to `pthread_mutexattr_settype’> > > > collect2: ld returned 1 exit status>> > > > sorry to take too much help from you.>> > > > On Mar 17, 1:19 am, RB <ram_bo…> wrote:> > > > > Thank you Fintan. I started to write a program, it seems it needs to> > > > > link with c.o file, how can I download that object file, there is no> > > > > option to download this file from any location. Is there a way?.> > > > > Thanks for letting me know.>> > > > > On Mar 14, 5:41 am, Fintan Quill <fint…> wrote:>> > > > > > Hello,>> > > > > > This is a good place to start:>> > > > > >https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC(user/pass:> > > > > > anonymous/anonymous.>> > > > > > Regards,>> > > > > > Fintan.>> > > > > > On Sun, Mar 13, 2011 at 5:31 AM, RB <ram_bo…> wrote:> > > > > > > Could somebody help me in getting some steps in calling q from C++. I> > > > > > > am a learner and some direction is very much appreciated. I got q> > > > > > > evaluation copied onto unbuntu. I want to link that with C++ from> > > > > > > eclipse. Thanks for your time and help.>> > > > > > > –> > > > > > > You received this message because you are subscribed to the Google> > > > Groups> > > > > > > “Kdb+ Personal Developers” group.> > > > > > > To post to this group, send email to> > > > personal-kdbplus@googlegroups.com.> > > > > > > To unsubscribe from this group, send email to> > > > > > > personal-kdbplus+unsubscribe@googlegroups.com.> > > > > > > For more options, visit this group at> > > > > > >http://groups.google.com/group/personal-kdbplus?hl=en.>> > > > –> > > >
Submitted via Google Groups</ram_bo…></fint…></ram_bo…></ram_bo…></char…></ram_bo…></ram_bo…>
cout<i;“a:2+2;a” will do the addition and return value of a as pinter to k0struct or K to the caller.k() will return this pointer K object and knowing the 2+2 is an intyou can address it via ->iOn Mar 26, 1:59?pm, RB <ram_bo…> wrote:> Thanks Charles, it worked.> I wanted to print ‘a’ from below code to console like cout << a.> Basically how can I access a as part of my C++ code.>> intc= khpu(“localhost”, 1234 ,“rb:rb”); // Connect to a Kdb+ server> on the localhost port 1234 .> ? ? ? ?k(-c,“a:2+2”,(K)0);>> Thanks again.>> On Mar 24, 12:22?am, Charles Skelton <char…> wrote:>>>> > it needs to link with the pthread library>> > e.g.>> > gcc … -pthread>> > On Wed, Mar 23, 2011 at 8:20 PM, RB <ram_bo…> wrote:> > > Thank you Kamil. Progressed I guess. But I get new problems now:> > > c.o: In function t1':> > > c.c:(.text+0x1741): undefined reference to
pthread_create’> > > /home/RB/c.o: In function ul':> > > c.c:(.text+0x176c): undefined reference to
pthread_rwlock_unlock’> > > /home/RB/c.o: In function wl':> > > c.c:(.text+0x179c): undefined reference to
pthread_rwlock_wrlock’> > > /home/RB/c.o: In function rl':> > > c.c:(.text+0x17cc): undefined reference to
pthread_rwlock_rdlock’> > > /home/RB/c.o: In function mi0':> > > c.c:(.text+0x369e): undefined reference to
pthread_rwlock_init’> > > c.c:(.text+0x36a6): undefined reference to pthread_mutexattr_init'> > > c.c:(.text+0x36b6): undefined reference to
pthread_mutexattr_settype’> > > collect2: ld returned 1 exit status>> > > sorry to take too much help from you.>> > > On Mar 17, 1:19 am, RB <ram_bo…> wrote:> > > > Thank you Fintan. I started to write a program, it seems it needs to> > > > link with c.o file, how can I download that object file, there is no> > > > option to download this file from any location. Is there a way?.> > > > Thanks for letting me know.>> > > > On Mar 14, 5:41 am, Fintan Quill <fint…> wrote:>> > > > > Hello,>> > > > > This is a good place to start:>> > > > >https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC(user/pass:> > > > > anonymous/anonymous.>> > > > > Regards,>> > > > > Fintan.>> > > > > On Sun, Mar 13, 2011 at 5:31 AM, RB <ram_bo…> wrote:> > > > > > Could somebody help me in getting some steps incallingq from C++. I> > > > > > am a learner and some direction is very much appreciated. I got q> > > > > > evaluation copied onto unbuntu. I want to link that with C++ from> > > > > > eclipse. Thanks for your time and help.>> > > > > > –> > > > > > You received this message because you are subscribed to the Google> > > Groups> > > > > > “Kdb+ Personal Developers” group.> > > > > > To post to this group, send email to> > > personal-kdbplus@googlegroups.com.> > > > > > To unsubscribe from this group, send email to> > > > > > personal-kdbplus+unsubscribe@googlegroups.com.> > > > > > For more options, visit this group at> > > > > >http://groups.google.com/group/personal-kdbplus?hl=en.>> > > –> > >
Submitted via Google Groups</ram_bo…></fint…></ram_bo…></ram_bo…></char…></ram_bo…>