I have had mixed results preparing DLLs to be called from Maple7 (an algebraic software package) under Windows 2000.
I can get only as far as preparing a function without arguments, based on a posting 14 Jun 00 by Carl Thompson: ------------8<------------ top cut -> bottom ------------->8------------ However, if foo() should go into a DLL, your files need to look like this: --- foo.c --- /* declaration (AKA prototype) of foo(), usually found in .h file */ __declspec(dllexport) int foo(); /* exporting foo() from this DLL */ /* definition of foo() */ int foo() { return 1; } ------------- Make a DLL from foo.c: gcc -c foo.c -o foo.o gcc -Wl,--out-implib,libfoo.import.a -shared -o foo.dll foo.o This will create the DLL (foo.dll) and the import library for the DLL (libfoo.import.a). ------------8<------------ bottom cut <- top ------------->8------------ I do not need to use libfoo.import.a to use foo.dll from Maple7. I cannot get this to work if I change foo.c to --- foo.c --- __declspec(dllexport) int foo(int i); int foo(int i) { return (i + 10); } ------------- I've tried examples from some older postings, dating back to 1997 and 1998, but these do not seem to work out. Is anyone using a current cygwin to prepare DLLs? Thanks. Lester P.S. I have a Sun PCi card in my Ultra10 running Windows 2000. Unlike some older cygwin I had a year or so ago, I could not get gcc to compile when cygwin was installed on a shared Unix directory, though other software runs fine this way. However, when I installed cygwin on my D drive, it seems to work fine. -- Prof. Lester Ingber [EMAIL PROTECTED] [EMAIL PROTECTED] www.ingber.com www.alumni.caltech.edu/~ingber -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/