• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

How to tell what architecture a lib file is compiled for

I ran into this problem the other day. How does one tell what architecture a dll and/or lib file is compiled for? Say I have a lib (library) file that was compiled under x86 but I try to use it in a arm (CE) architecture. As my problem was the other day I had no way of knowing what architecture the lib filed was compiled for. I just kept getting link errors when I  used the functions from within the lib.

Is there some tool or something that one can tell what architecture a library is compiled for?

Thanks
0
atomicgs12
Asked:
atomicgs12
1 Solution
 
alexey_gusevCommented:
try dumpbin: http://msdn.microsoft.com/en-us/library/c1h23y6c(VS.80).aspx

and use it like this:

dumpbin <path to lib> /headers

this utility parses lib file (ie COFF or PE format) and displays machine type at the very beginning of the dump:

http://stackoverflow.com/questions/3322630/determining-the-cpu-architecture-of-a-static-library-lib-on-windows
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now