MantisBT - CMake
View Issue Details
0011768CMakeCMakepublic2011-01-27 03:522011-06-06 18:25
Dongsheng Song 
David Cole 
highmajoralways
closedduplicate 
Windows
 
 
0011768: Mingw target can not process .DEF files
After I declared the following DLL target:

ADD_LIBRARY(freetds-db SHARED freetds-db.def freetds-db.rc
        bcp.c
        dblib.c
        dbopen.c
        dbutil.c
        rpc.c
        xact.c)

CMake use the following link command:

C:\gcc-4.5-windows\bin\gcc.exe -s -static -shared -o libfreetds-db.dll -Wl,--out-implib,libfreetds-db.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeFiles\freetds-db.dir/objects.a -Wl,--no-whole-archive ..\tds\libtds.a ..\replacements\libreplacements.a -lws2_32 -lssp -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
    
Completely ignored freetds-db.def file, I expected freetds-db.def file in the link file list, e.g.

C:\gcc-4.5-windows\bin\gcc.exe -s -static -shared -o libfreetds-db.dll -Wl,--out-implib,libfreetds-db.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeFiles\freetds-db.dir/objects.a -Wl,--no-whole-archive freetds-db.def ..\tds\libtds.a ..\replacements\libreplacements.a -lws2_32 -lssp -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
No tags attached.
duplicate of 0009997closed Brad King .def files are not passed to the mingw linker 
Issue History
2011-01-27 03:52Dongsheng SongNew Issue
2011-02-03 17:47David ColeRelationship addedduplicate of 0009997
2011-02-03 17:47David ColeStatusnew => resolved
2011-02-03 17:47David ColeResolutionopen => duplicate
2011-02-03 17:47David ColeAssigned To => David Cole
2011-06-06 18:25David ColeStatusresolved => closed
2011-06-06 18:25David ColeNote Added: 0026685

Notes
(0026685)
David Cole   
2011-06-06 18:25   
Closing resolved issues that have not been updated in more than 3 months.