2007/9/28, Bill Hoffman <[EMAIL PROTECTED]>: > The lib prefix is so that gcc can automatically link to the library with > the usual -L -l stuff.
>From my "very first" today experience giving up the 'lib' prefix is OK with mingw on a windows box (did not try a cross compiler though) Moreover, from the MinGW documentation you have: http://www.mingw.org/docs.shtml#compilingandbuilding === To create the dll and an executable that uses it, try the following: gcc -c hello.c gcc -c -DBUILD_DLL dllfct.c gcc -shared -o tst.dll -Wl,--out-implib,libtstdll.a dllfct.o gcc -o hello.exe hello.o -L./ -ltst === One more clear from GNU binutils specific win32 gnu ld behavior one can read: http://sourceware.org/binutils/docs-2.18/ld/WIN32.html#WIN32 direct linking to a dll [...] Linking directly to a dll uses no extra command-line switches other than -L and -l, because ld already searches for a number of names to match each library. [...] For instance, when ld is called with the argument -lxxx it will attempt to find, in the first directory of its search path, libxxx.dll.a xxx.dll.a libxxx.a cygxxx.dll (*) libxxx.dll xxx.dll I really think it's safe when both WIN32 and MINGW to set the lib prefix to "". I think that using this I may build more consistent DLL name. -- Erk _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
