Re: [q-lang-users] Request to know about using Q in C++ programs
Brought to you by:
agraef
From: Borse, G. <gan...@cr...> - 2007-10-24 03:21:19
|
Hi, Thanks for your guidance. It is great this does not create a new process for interpreter. Since, I want to embed the Q interpreter in my C++ application, is it sufficient to use only the "libqint" library for this? Or do I need to get all dependencies to link this library & use at run time with my program? Other problem is that, I am not able to install RPMs "q-7.8-5su101.i586.rpm" & "q-7.8-5.src.rpm" on my Linux OS because I do NOT have root privileges. While installing SRC RPM I got an error: error: cannot create %sourcedir /usr/src/redhat/SOURCES I have only Red Hat Linux 3 (Taroon Updt1) & no SUSE. Can I have binaries for Red Hat Linux also in tar.gz format? Please guide/ help. Many thanks for your time & guidance. Warm Regards Ganesh ------------------------------------------------------------------------------------------------------------- Message: 8 Date: Tue, 23 Oct 2007 10:38:02 -0400 From: John Cowan <co...@cc...> Subject: Re: [q-lang-users] Request to know about using Q in C++ programs To: "Discuss the Q language." <q-l...@li...> Message-ID: <200...@me...> Content-Type: text/plain; charset=us-ascii Borse, Ganesh scripsit: > In the topic "C.4 Embedding Q in C/C++ Applications " on web page "http://q-lang.sourceforge.net/qdoc/qdoc_15.html#SEC187 <http://q-lang.sourceforge.net/qdoc/qdoc_15.html#SEC187> <http://q-lang.sourceforge.net/qdoc/qdoc_15.html#SEC187 <http://q-lang.sourceforge.net/qdoc/qdoc_15.html#SEC187> > ", it mentioned > that before calling any eval functions from Q library, we need to do qexecv() or qexecl(). > > Does this mean that we create / fork a process from the parent C/ C++ program & then the script gets loaded into that new process? Not at all. qexecv() and qexecl() cause the Q interpreter to load a script to be run by the interpreter in the current process. They do not cause an underlying execv() or execl(), but are only generally analogous to them (start new script, pass arguments). -- Even the best of friends cannot John Cowan attend each others' funeral. co...@cc... --Kehlog Albran, The Profit http://www.ccil.org/~cowan <http://www.ccil.org/~cowan> > _____________________________________________ > From: Borse, Ganesh > Sent: 23 October 2007 20:42 > To: 'q-l...@li...' > Subject: Request to know about using Q in C++ programs > > Dear Sir, > I am impressed with the great feature of dynamic expression evaluation provided by Q language. > > I would like to use this for a C++ application which takes dynamic expressions like queries from database > > However, I want to do this in the same process & not over the other process. > > In the topic "C.4 Embedding Q in C/C++ Applications " on web page "http://q-lang.sourceforge.net/qdoc/qdoc_15.html#SEC187 <http://q-lang.sourceforge.net/qdoc/qdoc_15.html#SEC187> ", it mentioned that before calling any eval functions from Q library, we need to do qexecv() or qexecl(). > > Does this mean that we create / fork a process from the parent C/ C++ program & then the script gets loaded into that new process? > Please advise. > > Many thanks for your help. > > Warm Regards, > Ganesh ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================== |