This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dlopen a.exe


Chris Faylor writes:
 > Regardless, you won't be able to retrieve anything with dlsym() unless
 > either the function/variable has been defined with the __declspec(dllexport)
 > attribute or you've included it in a linker .def file.

Aha! 

So I have a .def file...under B20. 

Under 1.1 (?) OSTYPE changed from cygwin32 to cygwin, so my Makefile
wasn't creating the .def file.

I use config.guess but it didn't catch this, because it uses:

    i*:CYGWIN*:*)
	echo i386-pc-cygwin32
	exit 0 ;;

I'm happy to get things updated especially because I removed the one
other "OSTYPE" cygwin32 hack I had, it was fixed with a cleanup of I/O
to apparently let "cat" be "cat" and not mess around with adding
carriage returns.

Jon Cook was probably trying to do the same thing I was, not really open
a.exe, but the current executable. I was trying to do it with a.exe as
well, because configure builds a.exe files. I do this in configure to
see if I need to prepend symbol names with an underscore, as well as to
see if the library automatically tries to do this.

Jon, if you still care and didn't figure it out, I can send you a
pointer to my magic to use the dlltool etc to make dlopen work with a
NULL first argument, which I stole from the tcl port.

Thanks again Chris. My bad.

-bri

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]