C interface in version 3.0.0?

52 views
Skip to first unread message

Ken Dwyer

unread,
Jul 30, 2015, 12:19:59 PM7/30/15
to TANGO Project - ALGENCAN
I am trying to use ALGENCAN for the first time, and would like to call the solver from C. I followed the instructions in README to build the library, and am trying to build one of the given C examples:

g++ -O3 toyprob.c -L$ALGENCAN/lib -lalgencan -o algencan

I get the error message:

toyprob.c:279:40: error: ‘c_algencan’ was not declared in this scope
       &f,&cnorm,&snorm,&nlpsupn,&inform);
                                                             ^

Also, "_Bool" is not recognized as a type, so there are several more errors related to that. The C examples compile without issue in version 2.4.0. I'm not familiar with Fortran so I'm at a loss here. It seems like there should be a declaration of the c_algencan function somewhere, but why would this be missing?

Thanks,
-- Ken

John Gardenghi

unread,
Jul 30, 2015, 3:01:47 PM7/30/15
to TANGO Project - ALGENCAN, kdd...@gmail.com
Hello Ken,

Thanks for your interest in Algencan.

If you are using the standard GNU GCC compiler, try to compile using

gcc -O3 toyprob.c -L$ALGENCAN/lib -lalgencan -lgfortran -lm -o algencan

Regards,
John.

Ken Dwyer

unread,
Aug 1, 2015, 7:48:53 AM8/1/15
to TANGO Project - ALGENCAN, kdd...@gmail.com
Thank you very much John, that worked like a charm!

-- Ken
Reply all
Reply to author
Forward
0 new messages