Re: Dll Build Issue

Re: Dll Build Issue

Keith,
Taking your advice, I searched the archives and found a thread that claimed some libraries built under Visual Studio will not work under mingw due to differences in mangling. The respondent advised the poster to recompile the library sources under mingw 32. Could this be the issue? The libraries armulif and clx are supplied in binary form. I understand your point regarding linking order, that was my first thought, but I think I followed the dependency tree accurately.
Your point about --library is noted, I used it as the error messages seemed to originate from ld.

Robert Cavanaugh
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

Re: Dll Build Issue

On 6/17/2016 4:04 AM, Robert Cavanaugh wrote:
> Keith,
> Taking your advice, I searched the archives and found a thread that claimed some libraries built under Visual Studio will not work under mingw due to differences in mangling. The respondent advised the poster to recompile the library sources under mingw 32. Could this be the issue? The libraries armulif and clx are supplied in binary form. I understand your point regarding linking order, that was my first thought, but I think I followed the dependency tree accurately.
> Your point about --library is noted, I used it as the error messages seemed to originate from ld.
>

You don't need import libraries to link to a binary only distributed
library. You can link directly to the DLL itself. Specify the DLL as
an object file following the objects that use it. It has always been
the case that the object references come before the object definitions
while linking a library regardless of the programming language being
used. Sometimes you have to specify the object more than once on the
link commands in order to manage scenario of Object A depends on Object
B that depends on Object A. Visual Studio tends to help with that issue
by doing multiple passes of the objects in the statement which confuses
the issue.

GCC should be able to use a library compiled with Visual Studio as long
as the compiled object is pure C. In other words you cannot use objects
from Visual Studio C++ code because that is where the mangling will be
different.

Other mail list etiquette issues you have:
* your mail lines need to wrap to no more than 75 characters per line.
* you started a new thread rather than continuing the thread you began
earlier.

--
Earnie

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

Re: Dll Build Issue

You don't need import libraries to link to a binary only distributed
library. You can link directly to the DLL itself.

The libraries mentioned are not DLLs, they are statics.

Does that change your statement above?

| Sometimes you have to specify the object more than once on the| link commands in order to manage scenario of Object A depends on Object| B that depends on Object A. Visual Studio tends to help with that issue| by doing multiple passes of the objects in the statement which confuses| the issue.

Ah, that makes sense. Appreciate the insight.

I re-read the GNU documentation and realized

I misinterpreted the --library section

One item I am confused about; if I do not include '--library' and substitute '-l' the

compilation stops with ld reporting it "cannot find" the library with "-l" prepended to

the literal path. Adding "-Wl," has no effect. Removing the explicit path and

relying on the '-L' search paths is ignored as well.

|Other mail list etiquette issues you have:|* your mail lines need to wrap to no more than 75 characters per line.|* you started a new thread rather than continuing the thread you began|earlier.

Apologies, the last submission was done with my Kindle and

clearly its mail client has some issues. I thought I was responding

to the original thread.

If this message is acceptable I will continue to use this client or if not, go to T-bird

Thanks

Bob Cavanaugh

<Digest removed>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

Re: Dll Build Issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17/06/16 19:56, Robert Cavanaugh wrote:
> One item I am confused about; if I do not include '--library' and
> substitute '-l' the compilation stops with ld reporting it "cannot
> find" the library with "-l" prepended to the literal path. Adding
> "-Wl," has no effect. Removing the explicit path and relying on
> the '-L' search paths is ignored as well.

You need to SHOW us EXACTLY how you're specifying it; if your library
is called foo.lib, correct format is "-lfoo", (with no path, or ".lib"
extension), or "/path/to/foo.lib", (with no "-l"). If you use the
"/path/to/foo.lib", the linker will use exactly that library, (no "-L"
paths will be searched); OTOH, if you use the "-lfoo" form, the "-L"
paths in left-to-right order, until the first match to any of, (in
priority order), is found:

libfoo.dll.a
foo.dll.a
libfoo.a
foo.lib
libfoo.dll
foo.dll

>> Other mail list etiquette issues you have: * your mail lines need
>> to wrap to no more than 75 characters per line. * you started a
>> new thread rather than continuing the thread you began earlier.
>
> Apologies, the last submission was done with my Kindle and clearly
> its mail client has some issues. I thought I was responding to the
> original thread.

It appears that your Kindle client is not adding an appropriate
"In-Reply-To" header; thus, threading is broken.

> If this message is acceptable I will continue to use this client
> or if not, go to T-bird

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.