Cookie
Cookie

Reputation: 688

MinGW, linking to a dll on Windows

I'm trying to use a library I received from a camera vendor in a sample program. I have a .dll and a .lib file for the library. My compile command is:

g++  -o "Win32App.exe" -L"..\..\SK develop\SK91GigE-WIN\Lib" obj/winmain.o obj/callbacks.o obj/resource.o -s -lcomctl32 -Wl,--subsystem,windows -lSK91GigE_x64

and I get:

obj/winmain.o:winmain.cpp:(.text+0x292): undefined reference to `SK_LOADDLL'
collect2.exe: error: ld returned 1 exit status

having a look on the .lib with nm shows:

BFD: SK91GigE_x64.lib(SK91GigE_x64.dll): Recognised but unhandled machine type (0x8664) in Import Library Format archive 
nm: SK91GigE_x64.dll: File format not recognized

and for the dll it outputs:

nm: SK91GigE_x64.dll: File format not recognized

Any ideas how I can modify that lib to include it?

Upvotes: 3

Views: 7448

Answers (1)

Cookie
Cookie

Reputation: 688

windows path variable pointed to 32 bit MinGW. setting the path to the 64bit version of MinGW solved the problem. I didn't check that

Upvotes: 5

Related Questions