Changeset 104 for trunk/examples/c-example
- Timestamp:
- Oct 14, 2005 9:43:27 AM (19 years ago)
- Location:
- trunk/examples/c-example
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/c-example/Makefile
r92 r104 18 18 INCL_RP_DEPS = -I $(RP_BASE)/include 19 19 20 INCL_FILES = $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) 21 20 22 LIB_DIR = $(RP_BASE)/lib 21 23 LIB_INC_PREFIX = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) … … 25 27 26 28 plot: plot.cc 27 $(CXX) $(DEBUG) -DDEBUG $(INCL_ CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $< $(LIB_RAPPTURE)29 $(CXX) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE) 28 30 29 31 plotc: plotc.c 30 $(CC) $(DEBUG) -DDEBUG $(INCL_ CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $< $(LIB_RAPPTURE)32 $(CC) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE) -lm 31 33 32 34 #### CLEAN UP ############################################################ -
trunk/examples/c-example/plotc.c
r93 r104 1 1 #include "RpLibraryCInterface.h" 2 2 3 //#include <stdlib.h>3 #include <stdlib.h> 4 4 #include <string.h> 5 5 #include <stdio.h> 6 #include <math.h> 6 7 7 8 int main(int argc, char * argv[]) … … 10 11 RpLibrary* lib = NULL; 11 12 12 c har* filePath;13 c har* xmltext = NULL;13 const char* filePath; 14 const char* xmltext = NULL; 14 15 double fmin, fmax; 15 16 char strFormula[100]; … … 42 43 // cannot open file or out of memory 43 44 printf("FAILED creating Rappture Library\n"); 44 exit(1);45 return(1); 45 46 } 46 47 … … 54 55 else { 55 56 printf("xml(lib) failed\n"); 56 exit(1);57 return(1); 57 58 } 58 59 … … 62 63 if (! (xmltext) ) { 63 64 printf("getString(lib,input.number(xmin).current) returns null\n"); 64 exit(1);65 return(1); 65 66 } 66 67
Note: See TracChangeset
for help on using the changeset viewer.