Can you make a DLL from a library that requires caller-defined functions?
Yaakov (Cygwin Ports)
yselkowitz@users.sourceforge.net
Thu Aug 7 16:54:00 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
http://cygwin.com/acronyms/#PCYMTWLL !
Michael Rogers wrote:
| Yes, precisely. It has symbols for routines that are declared in a
| header file and called in some of the library routines. But they
| are actually required to be defined in the calling program. Thinking
| back to libraries I've linked to in the past, I don't think this
| is an entirely uncommon practice, at least with not static libraries.
It's not, and in those cases, generally a static library is necessary.
| It's fine with me to make it static but it has dependencies on the X11
| and Xpm libraries, which are DLLs. So would it be ok to make it at
| static library?
Yes, as long as you make sure that you link the executable in the right
order. IOW:
gcc -o bar.exe bar.o -lstaticfoo -lXpm -lX11
If you change the order of the link libraries, it will not work.
| The original library was static and was intended to be linkable
| against arbitrary calling programs, as long as they define the
| three required functions within them. I want this library only
| because it is used in one specific physics program - that's my real
| goal. So I don't absolutely need it to be linked against any other
| programs (but the test programs would be nice).
Sounds like static is the way to go, particularly if you're not linking
other libraries against this one.
Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAkibKJIACgkQpiWmPGlmQSPWCACfZHj0FVqi0hoAIlqWki15P67l
vOsAnjtKPa5PYZgCZvzx4f6VfakTBhSp
=sV9p
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
More information about the Cygwin-xfree
mailing list