From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: Re: Problem with linking mex files for matlab5 9 Jul 1998 23:18:25 -0700 Message-ID: References: <19980708000308 DOT AAA3932 AT robi> Reply-To: Mumit Khan Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: Robert Rozman Cc: gnu-win32 AT cygnus DOT com On Wed, 8 Jul 1998, Robert Rozman wrote: > Hello ! > > Sorry, for taking your precious time. But I have a problem with compiling mex file. I have Matlab5 under NT and I'm trying to compile mex under Cygwin32. In the final stage I get > Linking DLL ... > /GNU_cdk/B19/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libccrt0.o)(.text+0x92):libccrt0.cc: undefined reference to `GetModuleHandleA AT 4' > /GNU_cdk/B19/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libccrt0.o)(.text+0x92):libccrt0.cc: undefined reference to `GetModuleHandleA AT 4' > Cleaning up ... Without looking at your exact command lines and such, I'm assuming that you're using "ld" instead of gcc to create the DLL, right? If so, add -lkernel32 to the list of libraries and you should get past at least this error. (and please teach your editor to break long lines after 72-76 characters or so ...) Mumit - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".