SHARE
TWEET

Chatlog on #cygwin (freenode)

a guest Aug 15th, 2012 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. JainAmber> Hello
  2. <JainAmber> I'm trying to compile a simple "Hello world" C program under Cygwin
  3. <JainAmber> Here's the C program: http://codepad.org/TzdsJcXs
  4. <JainAmber> When I compile this with 'gcc -o test.exe test.c", a file test.exe gets created.
  5. <JainAmber> But when I try to run it on Cygwin prompt as './test.exe'  I get this error: "-bash: ./testit: cannot execute binary file"
  6. <JainAmber> * "-bash: ./test: cannot execute binary file"
  7. <JainAmber> When I run "file test.exe", I get: "test.exe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped"
  8. <JainAmber> What am I doing wrong?
  9. <JainAmber> Also, I'm using linux-x86_64-gcc (version 4.7.1-1) from Cygwin Ports (i.e. http://sourceware.org/cygwinports/)...
  10.  
  11. <cygwinports> you said you were using 'gcc -o test.exe test.c', so which is it?
  12. <JainAmber> cygwinports, I updated gcc symbolic link to point to 'i686-pc-linux-gnu-gcc-4.7.1.exe' (in /cygdrive/c/cygwin/bin)
  13. <cygwinports> don't do that
  14. <JainAmber> What should I do then?
  15. <cygwinports> 'gcc' is supposed to be the *native* compiler
  16.  
  17. <cygwinports> what are you trying to do?
  18. <JainAmber> I'm trying to port a project to Cygwin. And I found that std::future isn't defined, it is only declared..
  19. <JainAmber> I found out that std::future isn't defined (it is only declared) from http://cygwin.1069669.n5.nabble.com/GCC-4-4-0-Can-t-activate-threading-support-td50226.html
  20. <cygwinports> well then you need to use a *cygwin* gcc, not a linux one
  21. <JainAmber> Ah yes, I got it now... I'm using the wrong package
  22. <JainAmber> cygwinports, what is difference between linux gcc and cygwin gcc?
  23. <JainAmber> I mean what is Linux gcc for in cygwin ports?
  24. <cygwinports> one makes binaries which run on linux, the other makes binaries which run on cygwin
  25.  
  26. <cygwinports> std::future is C++11, you'll need to wait for a cygwin gcc-4.7
  27. <JainAmber> I could not find other threads on Cygwin mailing list that state whether threads are available in newer version of gcc/g++ port (4.7 in Cygwin Ports project)...so I thought of installing it and checking it out myself...
  28. <JainAmber> ok
  29.  
  30. <JainAmber> Any idea about work/progress on cygwin-gcc-4.7?
  31. <cygwinports> its being worked on, but I can't give you a date right now
  32. <JainAmber> I don't understand much C++ but if the port does *not* requires writing C++ code, I can help/volunteer for cygwin-gcc-4.7...
  33. <JainAmber> This seems a bit outdated but I guess this will be helpful: http://cygwin.wikia.com/wiki/How_to_install_a_newer_version_of_GCC
  34. <JainAmber> A recent post on Cygwin mailing list says: "Ignore the wikia article." .... Aye aye sir!
  35. <cygwinports> patches are definitely required for Cygwin, feel free to see the gcc4 source package for the patchset and build procedure
  36. <JainAmber> ok
  37. <JainAmber> Thanks a lot, cygwinports!
RAW Paste Data
Top