Hello Oliver,
-----Original Message-----
From: Oliver Graf [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: precompiler --> define, includepath, ...

Hi list, hi Burkhard!
 
I�m still at my precompiler-problem, but i think it�s a pointer problem in my source. The mystery is, that when my where-string would return less than 36 rows, i get a "segmentation fault" else it runs fine returning all claimed rows.
 
For this please send me a code example.
Another difficulty, I �d like to clear:
In my project, I have something like this:
 
#ifndef SQL_PRECOMPILE
   char my_var[4];
#else
  EXEC SQL BEGIN DECLARE SECTION;
    char my_var[4];
  EXEC SQL END DECLARE SECTION;
#endif
 
How can I start the Precompiler with a def-variable? In `cpc -h` and the documentation I couldn�t find anything.
Other programs can be started like `prog -DSQL_PRECOMPILE`.  Any hints?
 
Sorry but it is not possible to use conditional compiling within the declare section or EXEC SQL. Because the Precompiler process only simple preprocessor macros like
 
EXEC SQL BEGIN DECLARE SECTION
#define MYVAL (1)
char my_var[MYVAL];
EXEC SQL BEGIN DECLARE SECTION
 
The only way I know is to use the C-Preprocessor (option -e) before the Precompiler run.
 
And how can i start the precompiler using some includepaths? 
 
The files you can include with the EXEC SQL INCLUDE command must located in the same directory as your cpc source. There is no way to changes this.
 
Regards,
Burkhard

Reply via email to