Solved

How to tell what architecture a lib file is compiled for

Posted on 2010-09-21
1
358 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 500 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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 Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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