Web lists-archives.com

Re: [Mingw-users] Problems creating linkable file from MSVC .lib

On  Friday, February 19, 2016 11:24 AM, Chris wrote:
> The command used to link:
> g++  -o dist/sidtest build/SIDTest_
> Windows/MinGW-Windows/source/candevice/windows/VectorDriver.o 
> <...more of my .o files...>
> lib/windows/ia32/libvcinpl.a lib/windows/ia32/libvcand32.a 
> -static -static-libgcc -static-libstdc++

Strange. The -static flag in your command line tells gcc not to link
against share libraries. From gcc --help -v:

-Bstatic, -dn, -non_shared, -static
                              Do not link against shared libraries

So gcc is correct to say that the functions cannot be found.

However, you say that your successful command that links directly
to the DLL instead of the import library also includes -static.

Anyway, try removing -static from the unsuccessful command line.

Also, I am just noticing that you call the import library libvcand32.a.
It should be called libvcand32.dll.a. The static library (if you had one)
would be called libvcand32.a. I don't know whether it matters or not,
but I would make that change also.

John Brown.

Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe