x86_64-w64-ming32-g++ file not recognized by objdump

Sisyphus sisyphus1@optusnet.com.au
Sun Aug 21 02:11:00 GMT 2011

----- Original Message ----- 
From: "Thomas D. Dean"

> #include <vector>
> #include <string>
> using namespace std;
> int main() {
>  vector<string> vs;
>  vs.push_back("asdf");
> }
> If I compile with g++, I get an executable that works, i.e. runs without
> error.  This file is recognized by objdump and cygcheck.
> If I compile with x86_64-w64-ming32-g++ -m64 t.cc -o t

I presume the 'ming32' is a typo.
Is the '-m64' necessary ?
What happens if you remove it from the command ?

I can't reproduce the error you get (either with or without '-m64'), though 
I'm just running mingw in the cmd.exe shell - not under Cygwin.

> the resulting executable produces an error message
>> ./t.exe
> t.exe: error while loading shared libraries: ?: cannot open shared
> object file: no such file or directory.
>> objdump -p ./t.exe
> objdump: ./t.exe: File format not recognized

I think that's to be expected - objdump expects to look at a 32-bit 
I get the same error when I run objdump on a 64-bit executable.
x86_64-w64-mingw32-objdump -p ./t.exe


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list