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:

  1. gcc/ld can link (properly exporting) 32-bit dlls , .lib/.a import , static libraries.
  2. gcc/ld should able link exporting 64-bit dll or .a import or static lib, never 64-bit .lib file.
  3. 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:

  1. build through call gcc, not direct calls binutils. options -shared -o name.dll -wl,--import-lib, libname.dll.a should started.

  2. use mingw-w64's gendef (it's in mingw-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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -