liyalou
06-25-2004, 02:10 AM
In my program, I have to call some 'C' functions in a static libary. One of them is a Variable Argument Lists function, which is declare as following:
int cli_execute_query(int statement, int for_update, void* record_struct, ...);
When I call it in fortran as:
nrc = cli_execute_query(val(nsql1), val(cli_for_update), RecBus, val(50))
a error message "abnormal program termination" is reported and the program aborts.
I write a small program to call C functon 'printf' in Fortran. It also do not work correctly.
Does somebody give me some advices on how to call "Variable Argument Lists C function" in Fortran?
int cli_execute_query(int statement, int for_update, void* record_struct, ...);
When I call it in fortran as:
nrc = cli_execute_query(val(nsql1), val(cli_for_update), RecBus, val(50))
a error message "abnormal program termination" is reported and the program aborts.
I write a small program to call C functon 'printf' in Fortran. It also do not work correctly.
Does somebody give me some advices on how to call "Variable Argument Lists C function" in Fortran?