Ask Your Question
0

Library importing error

asked 2014-12-01 02:04:44 -0600

updated 2015-09-02 04:33:35 -0600

berak gravatar image

Version:

Eclipse: Luna

CDT: 8.5

WinGW: 4.8

OpenCV: 3

The following shows the Librariy config: lib config

the error information is:

Recognised but unhandled machine type (0x8664) in Import Library Format archive

edit retag flag offensive close merge delete

Comments

1

if you were trying to use the precompiled ms libs - no way with mingw.

if you want to use a non-ms compiler, you will have to build the opencv libs from src, using cmake (full-stop)

berak gravatar imageberak ( 2015-09-02 00:27:24 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2015-09-01 17:45:29 -0600

I found an entry at https://sourceware.org/bugzilla/show_... that specifically addresses this problem: Bug 16598 - Microsoft import libraries not correctly handled for x64

It was reported (with a fix) on 17 Feb 2014. An extract from the entry:

.... the bug is pretty serious - the way I first encountered the problem was to use the GNU linker to attempt to link a 64-bit executable using the same import library. When you run the program it will crash because the operand to the jmpq was relocated incorrectly.

The fix turns out to be trivial. In bfd/peicode.h, there is code to create a BFD section from a Microsoft import library stub, and for AMD64 it is using the wrong relocation type when it adds the relocation. Thus this simple conditional addresses the problem.

[* The code snippet does not display properly in this box, so I refer the reader to the Bugzilla posting to see it. *]

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-12-01 02:04:44 -0600

Seen: 2,077 times

Last updated: Sep 01 '15