Linking 64bit dll mingw -
i'm linking dll dependencies on other dlls. have trouble linking 64bit version of project. 32bit version ok far use mingw32. when switch 64bit version of dependent dlls , mingw-w64 tells following:
c:/.../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible .\lib\native/libblabla.dll when searching -llibblabla
where 'libblabla' library depend on. i'm absolutely sure 64bit version , should compatible. bug in mingw?
also, tried link using lib file, provided lib considered incompatible , 1 generated dlltool has no import table generated!
i'm totally stuck this. thank you.
first, possible misunderstanding out of way:
- gcc/ld can link (properly exporting) 32-bit dlls ,
.lib
/.a
import , static libraries. - gcc/ld should able link exporting 64-bit dll or
.a
import or static lib, never 64-bit.lib
file. - you aren't building/linking
-m32
, you?
by "properly exporting" mean dumpbin /exports
or nm -t
reveal exported symbols when run on dll.
what should try:
build through call gcc, not direct calls binutils. options
-shared -o name.dll -wl,--import-lib, libname.dll.a
should started.use mingw-w64's
gendef
(it's inmingw-w64-tools
directory in svn/sources) generate .def file, can create import library.
if these produce no symbols in import library, you're not exporting symbols. although surprising error message says dll 32-bit. msys/cygwin's file
command on dll return?
Comments
Post a Comment