[Klone-users] Using Klone with C++ - Bug???
thomas fossati
tho at koanlogic.com
Fri Mar 7 06:42:55 EST 2008
Hi,
On Mar 7, 2008, at 11:48 AM, diakat 2000 wrote:
> I'm using Klone 2.0.1 under Cygwin. All works fine with the
> .kl1-files. But now I need to implement some C++ functions. But it
> doesnt work.
> At the easiest way I tried the following (as recommended): Renaming
> the standard file index.kl1 to index_2.klx.
> At first glance it seems to work correctly: the g++ instead gcc is
> taken. But compilation failes with the messages:
>
> "pg_c4e12396902149b15aef98f3cc727f29.cc: In function 'index_2.klx()'":
> pg_c4e12396902149b15aef98f3cc727f29.cc:12: error: invalid conversion
> from 'volatile int* to int' ....
>
> It looks like an autogenerated file. The refered line(s) look like
> this:
>
> 10 #include <klone/emb.h>
> 11 static const char *SCRIPT_NAME = "index_2.klx";
> 12 static int index_2_klx (void) { volatile int x = &x; return x; }
> 13 static request_t *request = NULL;
> 14 static response_t *response = NULL;
> 15 static session_t *session = NULL;
> 16 static io_t *in = NULL;
> 17 static io_t *out = NULL;
> 18 #line 1 "/usr/klone2/webapp/www/index_2.klx"
>
>
> I hope, somebody can help me to make c++ available.
copy the attached file to klone-2.0.1/build/target/ then add
KLONE_TARGET_PATCH_FILE = fixc++.patch
to the top-level Makefile, it should work.
ciao, t.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixc++.patch
Type: application/octet-stream
Size: 424 bytes
Desc: not available
Url : http://koanlogic.com/pipermail/klone-users/attachments/20080307/262abc9f/fixc.obj
-------------- next part --------------
More information about the klone-users
mailing list