Hello! I haven't been able to find anything about this in the archives. I recently decided to replace my old Cygwin installation with a new, fresh one, so everything should be up-to-date here. [That's my recommendation: perhaps a way to make it easier to install fresh; it was necessary to rename both the old Cywin installation and the location of the downloaded installation packages to keep setup from finding them.]
The DLL questions are regarding programs compiled within Cygwin: when a program can't find a DLL, one expects some sort of error message to that effect, and which would indicate the DLL in question. As my demo below shows, programs simply exit silently and unceremoniously when that happens. Second, symlinking to DLLs doesn't enable programs to find them, as is also shown below. The question turned up when I compiled ffmpeg within Cygwin and the DLLs it produced weren't where ffmpeg.exe expected them to be, and it simply exited with no visible evidence of why. Moving the DLLs to where ffmpeg.exe could see them fixed the problem; however, symlinking to them (which is how ffmpeg installs itself) rather than copying them did not work. I am assuming that programs compiled entirely within the Cygwin environment, with Cygwin tools and libraries, should know Cygwin symlinks, and they do, usually, apparently just not when trying to load DLLs. Here's a basic test, compiling and running the same sources in Cygwin and MinGW. Everything is the same in both cases except that after renaming the DLL to hide it from footest.exe, running the Mingw version produces a dialog saying that footest.dll can't be found, while in the Cygwin case, nothing happens at all; the program simply silently aborts. Additionally, symlinking footest.dll to footest-save.dll after the rename doesn't help, as mentioned above. Anybody know anything about this? ============== /* footest.h */ #include <unistd.h> #include <stdlib.h> #include <stdio.h> void do_nothing_particularly_spectacular(void); ============= /* Missing DLL test: Cygwin vs. non-Cygwin footest-1.c (Main program) (Aren't you glad that old joke wasn't about a pterodactyl?) */ #include "footest.h" main(int argc, char **argv) { printf("footest: You've gotten as far a main(), anyway.\n"); do_nothing_particularly_spectacular(); printf("footest: You've gotten back from the DLL, but you knew that.\n"); exit(0); } ================= /* Missing DLL test: Cygwin vs. non-Cygwin footest-2.c (DLL source) */ #include "footest.h" void do_nothing_particularly_spectacular(void) { printf("You've found the DLL. Congratulations.\n"); } ============== The action under Cygwin (Some lines here are wrapped by Thunderbird.): $ export PS1="\...@\h (Cygwin) \$ " rsim...@higgins (Cygwin) $ rm -f footest.exe footest*.dll rsim...@higgins (Cygwin) $ gcc --version gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. rsim...@higgins (Cygwin) $ gcc -shared -o footest.dll footest-2.c rsim...@higgins (Cygwin) $ gcc -o footest.exe footest-1.c footest.dll rsim...@higgins (Cygwin) $ footest ; echo $? footest: You've gotten as far a main(), anyway. You've found the DLL. Congratulations. footest: You've gotten back from the DLL, but you knew that. 0 rsim...@higgins (Cygwin) $ mv -i footest.dll footest-save.dll rsim...@higgins (Cygwin) $ footest ; echo $? 53 rsim...@higgins (Cygwin) $ ln -s footest-save.dll footest.dll rsim...@higgins (Cygwin) $ footest ; echo $? 53 rsim...@higgins (Cygwin) $ # Nothing happened in the last two cases to # indicate that the program failed to do rsim...@higgins (Cygwin) $ # anything because of a missing DLL. Also, # as you can see, symlinking the renamed DLL # to the original name didn't help. rsim...@higgins (Cygwin) $ exit exit Thanks for any help, Ray Simard -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/