Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to tell what architecture a lib file is compiled for

Posted on 2010-09-21
1
Medium Priority
?
363 Views
Last Modified: 2013-12-27
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
Comment
Question by:atomicgs12
1 Comment
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 2000 total points
ID: 33737313
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question