Received: by 10.100.106.12 with SMTP id e12mr763349anc.28.1242138488967; Tue,
12 May 2009 07:28:08 -0700 (PDT)
Date: Tue, 12 May 2009 07:28:08 -0700 (PDT)
X-IP: 77.243.35.35
User-Agent: G2/1.0
X-Google-Token: iIgNPgwAAABZ6N3RkbfcH-0RSaGl2GGD
X-HTTP-Via: 1.1 ISA-HQ-02
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
2.0.50727),gzip(gfe),gzip(gfe)
Message-ID:
Subject: Interface to kdb+ with c++
From: Jespr
To: “Kdb+ Personal Developers”
X-Google-Approved: charlie@kx.com via web at 2009-05-12 14:33:14
I have tried to interface kdb+ with c++, but i’m not getting any
where. I am using Visual studio 2005 this i my code:
#include “k.h”
int main()
{
int c=khp(“localhost”,5001);
return 0;
}
I have included q.lib in the linker settings. The program compiles
with no errors, but when I start the program I get an error “The
application failed to initalize properly (0xc0000005). Click on OK to
terminate the application.”
I got q.lib from http://kx.com/q/w32/q.lib
What am I doing wrong?
X-Mailer: Apple Mail (2.930.3)
you need to include c.o in your build from http://kx.com.w32/c.o
Thank you very much that was very helpful.I included http://kx.com/q/w32/c.lib and download http://kx.com/q/w32/c.dllto my c++ project directory and it works now.On 12 Maj, 16:59, Felix Lungu <felix.lu…> wrote:> you need to include c.o in your build fromhttp://kx.com.w32/c.o>> On 12 May 2009, at 17:28, Jespr wrote:>>>>>> > I have tried to interface kdb+ with c++, but i’m not getting any> > where. I am using Visual studio 2005 this i my code:>> > #include “k.h”>> > int main()> > {>> > int c=khp(“localhost”,5001);>> > return 0;> > }>> > I have included q.lib in the linker settings. The program compiles> > with no errors, but when I start the program I get an error “The> > application failed to initalize properly (0xc0000005). Click on OK to> > terminate the application.”>> > I got q.lib fromhttp://kx.com/q/w32/q.lib>> > What am I doing wrong?- Skjul tekst i anf?rselstegn ->> - Vis tekst i anf?rselstegn -</felix.lu…>
X-Mailer: Apple Mail (2.930.3)i would recommend to use c.o rather than c.dll. it is very small and it reduces the external dll dependancy or conflicts.On 13 May 2009, at 09:21, Jespr wrote:>> Thank you very much that was very helpful.> I included http://kx.com/q/w32/c.lib and download http://kx.com/q/w32/c.dll\> to my c++ project directory and it works now.>> On 12 Maj, 16:59, Felix Lungu <felix.lu…> wrote:>> you need to include c.o in your build fromhttp://kx.com.w32/c.o>>>> On 12 May 2009, at 17:28, Jespr wrote:>>>>>>>>>>>>> I have tried to interface kdb+ with c++, but i’m not getting any>>> where. I am using Visual studio 2005 this i my code:>>>>> #include “k.h”>>>>> int main()>>> {>>>>> int c=khp(“localhost”,5001);>>>>> return 0;>>> }>>>>> I have included q.lib in the linker settings. The program compiles>>> with no errors, but when I start the program I get an error “The>>> application failed to initalize properly (0xc0000005). Click on OK >>> to>>> terminate the application.”>>>>> I got q.lib fromhttp://kx.com/q/w32/q.lib>>>>> What am I doing wrong?- Skjul tekst i anf?rselstegn ->>>> - Vis tekst i anf?rselstegn -> ></felix.lu…>
ok that sounds reasonable, I will use the c.o instead. Thanky you forthe advice.On 13 Maj, 11:39, Felix Lungu <felix.lu…> wrote:> i would recommend to use c.o rather than c.dll. it is very small and ?> it reduces the external dll dependancy or conflicts.>> On 13 May 2009, at 09:21, Jespr wrote:>>>>>> > Thank you very much that was very helpful.> > I includedhttp://kx.com/q/w32/c.liband downloadhttp://kx.com/q/w32/c.dll> > to my c++ project directory and it works now.>> > On 12 Maj, 16:59, Felix Lungu <felix.lu…> wrote:> >> you need to include c.o in your build fromhttp://kx.com.w32/c.o>> >> On 12 May 2009, at 17:28, Jespr wrote:>> >>> I have tried to interface kdb+ with c++, but i’m not getting any> >>> where. I am using Visual studio 2005 this i my code:>> >>> #include “k.h”>> >>> int main()> >>> {>> >>> int c=khp(“localhost”,5001);>> >>> return 0;> >>> }>> >>> I have included q.lib in the linker settings. The program compiles> >>> with no errors, but when I start the program I get an error “The> >>> application failed to initalize properly (0xc0000005). Click on OK ?> >>> to> >>> terminate the application.”>> >>> I got q.lib fromhttp://kx.com/q/w32/q.lib>> >>> What am I doing wrong?- Skjul tekst i anf?rselstegn ->> >> - Vis tekst i anf?rselstegn – Skjul tekst i anf?rselstegn ->> - Vis tekst i anf?rselstegn -</felix.lu…></felix.lu…>
X-Mailer: Apple Mail (2.930.3)sorry, on windows it is c.obj not c.o.On 13 May 2009, at 13:15, Jespr wrote:>> ok that sounds reasonable, I will use the c.o instead. Thanky you for> the advice.>> On 13 Maj, 11:39, Felix Lungu <felix.lu…> wrote:>> i would recommend to use c.o rather than c.dll. it is very small and>> it reduces the external dll dependancy or conflicts.>>>> On 13 May 2009, at 09:21, Jespr wrote:>>>>>>>>>>>>> Thank you very much that was very helpful.>>> I includedhttp://kx.com/q/w32/c.liband downloadhttp://kx.com/q/w32/c.dll>>> to my c++ project directory and it works now.>>>>> On 12 Maj, 16:59, Felix Lungu <felix.lu…> wrote:>>>> you need to include c.o in your build fromhttp://kx.com.w32/c.o>>>>>> On 12 May 2009, at 17:28, Jespr wrote:>>>>>>> I have tried to interface kdb+ with c++, but i’m not getting any>>>>> where. I am using Visual studio 2005 this i my code:>>>>>>> #include “k.h”>>>>>>> int main()>>>>> {>>>>>>> int c=khp(“localhost”,5001);>>>>>>> return 0;>>>>> }>>>>>>> I have included q.lib in the linker settings. The program compiles>>>>> with no errors, but when I start the program I get an error “The>>>>> application failed to initalize properly (0xc0000005). Click on OK>>>>> to>>>>> terminate the application.”>>>>>>> I got q.lib fromhttp://kx.com/q/w32/q.lib>>>>>>> What am I doing wrong?- Skjul tekst i anf?rselstegn ->>>>>> - Vis tekst i anf?rselstegn – Skjul tekst i anf?rselstegn ->>>> - Vis tekst i anf?rselstegn -> ></felix.lu…></felix.lu…>