On Mon, Jun 29, 2009 at 11:34 AM, Nathann Cohen<nathann.co...@gmail.com> wrote: > > Hello everybody !!! > > I have been trying for ages to post a clean patch for Cliquer, a > software used to solve the Max Clique problem in Sage. It has been > refused a lot of times for reasons I understand, but I still do not > know how to correct it. My problem is the following : > I have a C program without a makefile which is meant to be used from > the command line, and I would like to interface it with SAGE. I have > been told this should be done through libraries, and I do not have the > slightest idea of how it works in Cython. I just read those two > pages : > > http://docs.sun.com/source/819-3690/Building.Libs.html > http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html > > They explain well enough how to build libraries with gcc, but I do not > know how to access their functions with Cython. I tried to look for > "dlopen" in the cython files without any luck, so I do not think it > should be done this way. So : When you have a library file, how do you > access its functions through Cython ? > > Thank you for your help !! ;-)
Can you carefully try the examples and read the code here http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#MORE-EXAMPLES In particular, look at everything through Section 6.5, since 6.5 is the closest thing to what you'll be doing with Cython. After you have done that and really understand that, please reply. Also, just to be sure, try to do Section 6.5 but with cliquer replacing "libhello" from that example. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---