diff --git a/control/examples/wrapper/Makefile b/control/examples/wrapper/Makefile index c10dccc..de26571 100644 --- a/control/examples/wrapper/Makefile +++ b/control/examples/wrapper/Makefile @@ -26,5 +26,5 @@ clean: @echo "Cleaning..." rm -f $(OBJECTS) $(OUT) *.bin gnuplotscript.gp -.cpp.o: +.c.o: $(COMPILE) -c $< -o $@ diff --git a/control/examples/wrapper/main.c b/control/examples/wrapper/main.c index f2bd7b6..46a0f68 100644 --- a/control/examples/wrapper/main.c +++ b/control/examples/wrapper/main.c @@ -1,7 +1,14 @@ #include "b15f/wrapper/b15f.h" +#include int main() { - b15f_t* instance = get_instance(); + char buf[512]; + b15f_t* instance = get_instance(buf, sizeof(buf)); + + if (instance == NULL) { + fprintf(stderr, "%s", buf); + return -1; + } return 0; } \ No newline at end of file