Quantcast

newbie errors

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

newbie errors

Ralph Hipps
tried that.... fails.

c:\ash>gcc -Wl,--no-undefined -L. -o aaspi_file.exe aaspi_file.o -laardvark

./aardvark.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status

I'm curious about the 'usual' place libs are kept thing, should I be copying .dll files into a special dir under the MinGW install dir?

I'm starting to thing an earlier comment about the .dll format being wrong may be the issue. Not sure how to fix that tho.

What about the .h file instead, is there a way to skip the .dll and use the .h instead? would that work or am I a total n00b?

Ralph

>+<
 |    /\
 |___/  \
 [_@_]   `<
 O O O   
      IRS!
------------------------------------------------------------------------------------
In the twenty-first century, the robot will take the place
which slave labor occupied in ancient civilization.
 -- Nikola Tesla
------------------------------------------------------------------------------------


------------------------------------------------------------------------------

_______________________________________________
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.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: newbie errors

Eli Zaretskii
> From: Ralph Hipps <[hidden email]>
> Date: Sun, 27 Nov 2016 09:20:55 -0800
>
> tried that.... fails.

Yes, but now it's clear why, I think.

> c:\ash>gcc -Wl,--no-undefined -L. -o aaspi_file.exe aaspi_file.o -laardvark
>
> ./aardvark.dll: file not recognized: File format not recognized
> collect2.exe: error: ld returned 1 exit status

There you go: that DLL is not compatible with file formats MinGW
supports.  Are you sure it's a 32-bit Windows DLL?

> I'm curious about the 'usual' place libs are kept thing

It's ../lib relative to where gcc.exe is installed.  For the full
answer, invoke this command:

  gcc -print-search-dirs

and it will tell you where it looks for everything.

> should I be copying .dll files into a special dir under the
> MinGW install dir?

Shouldn't be needed, no.

> I'm starting to thing an earlier comment about the .dll format being wrong may be the issue. Not sure how to
> fix that tho.

Get a DLL that's compatible with native 32-bit Windows programs.

> What about the .h file instead, is there a way to skip the .dll and use the .h instead? would that work or am I a
> total n00b?

Unlikely.

------------------------------------------------------------------------------
_______________________________________________
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.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: newbie errors

Keith Marshall-3
In reply to this post by Ralph Hipps
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/11/16 17:20, Ralph Hipps wrote:
> tried that.... fails.
>
> c:\ash>gcc -Wl,--no-undefined -L. -o aaspi_file.exe aaspi_file.o -laardvark
>
> ./aardvark.dll: file not recognized: File format not recognized
> collect2.exe: error: ld returned 1 exit status

So, clearly your aardvark.dll either isn't suitable for use with
MinGW, or it has been damaged.  You have the right command now; you
need to pay attention to what the diagnostics are telling you.

> I'm curious about the 'usual' place libs are kept thing, should I be
> copying .dll files into a special dir under the MinGW install dir?

I gave you a reference, the other day, which explains all this.  Did
you bother to read it, as I advised?  If not, perhaps you should.

> I'm starting to thing an earlier comment about the .dll format being
> wrong may be the issue.

Yes, I'm sure it is.  What is the output from running

   file aardvark.dll

at the MSYS command prompt?

> Not sure how to fix that tho.

Either rebuild it yourself, from source, or ask the aardvark support
folks where you can get a replacement which will work with MinGW.

> What about the .h file instead, is there a way to skip the .dll and
> use the .h instead? would that work ...

No.  The .h file *describes* the library *interface* to the compiler;
it is not a library, and most definitely *cannot* replace the library
it describes.

> ... or am I a total n00b?

Maybe, but we all were once; we all had to learn, at some time.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJYOxvUAAoJEMCtNsY0flo/7qUQALRC1Yz20fZH3xiALyW1UVLv
IgxWIbpjjGZUvlloqzq6VAAAUOp1DyrUBKqBUr9tCNiO0YhzaOPByDHWiJY+Ss0N
3Qzd/Z9Hoqgow+pZ0WQDwYkXn9qJetx0jGLRiVSu6Wq5HqSWia9yA0yvY7MM7dBM
1UxON2aY1SH5fQGEwq3b1eh4cj/Pv4rv12G9GTlbrYqsPvDIQXIpEcIOp0iDQJQu
Q6toFXISTVOoeiKPVJr7KzlS7Z3LdVlmCYlsc7dCAhLkfJaFV//53PHI4O2x1gI8
sS+ZHfnIevX6hL8T6mdgLMLUBFSw25QlrlMOyLEyicMpZZMZBl006Q+3Vyb+xrJw
F/8BI7taE6K4AHAtIZ0PTJUSh37Vewj9MCVljVJYHYle7XiOh4j6HD9SPK3iWYTz
Mcf2qeLgmEbplZVTmsWbUIDXFkTbfNoISgUW4makp7S31T3bnzP8lZKtxCNNgSDQ
SuEVI+oPeqa9QFZubgcg6BLC5zv1TArBWIkH9lRa4PCoCmnAP/R5DO4WPHoK5n93
kyC00z9ZMHXbfK971fl/Rb6yHsOyw5TXBZz74UrHSzpZ0cwD6QXb7EI6JbCpMBbY
tHXPu6b4XN437mQsPEeTMCoFZXvKK5vIfkLfKmrgGAXQ1UmK5SKw9ei7KYIChNDK
oV7OoFL2yeqc3KZ0DEw3
=iy/r
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
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.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Loading...