From: SourceForge.net <no...@so...> - 2007-04-27 05:00:41
|
Bugs item #1708364, was opened at 2007-04-26 15:47 Message generated for change (Comment added) made by kenjackson You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1708364&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc Group: Vista Issue Status: Open Resolution: None Priority: 5 Private: No Submitted By: sunseraphic (sunseraphic) Assigned to: Danny Smith (dannysmith) Summary: "Is this Bug relating to Vista or Not?" Initial Comment: I'v installed the latest stable version of MinGW. This is not my first time installing MinGW on a Vista Platform. All runs normally until this time. What I Meet: I just using "gcc" command compile a Hello to test. code: /* This is a Hello Program testing gcc */ #include <iostream> int main() { printf("Hello,world!\n"); return 0; } I save it as Hello.cpp on desktop and then use cmd.exe of Vista like this: C:\Users\$MyUsrNameofVista$\Desktop>gcc Hello.c Below is what it report to me: Hello.c:1:17: no include path in which to search for stdio Then I give the directive with the whole pathname of gcc like this: C:\Users\$MyUsrNameofVista$\Desktop>D:\craft\MinGW\bin\gcc hello.c Then: hello.c:1:17: stdio: No such file or directory I then change the directory both Mingw and the source file as many as possible combinations with no miracle occured. But,When I use Eclipse+CDT,something different came out: Normally,if mingw gcc can work well,you needn't set any enviorment variable in Eclipse settings,but this time,I just try to set the envirorment variable in Eclipse settings,it works! Though the gcc still can't work well under cli model. This Problem came not too early,at least I can run mingw well on vista for nearly 3 month.All problem came out after I reinstalled my vista. I hope who can give me some help to sovle the damned problem. ---------------------------------------------------------------------- Comment By: Ken Jackson (kenjackson) Date: 2007-04-27 00:00 Message: Logged In: YES user_id=512584 Originator: NO Oops. I forgot the dashes to indicate stdin in my last: echo '#include <stdio.h>' | gcc -H -E -xc - | less echo '#include <iostream>' | g++ -H -E -xc++ - | less ---------------------------------------------------------------------- Comment By: Ken Jackson (kenjackson) Date: 2007-04-26 23:50 Message: Logged In: YES user_id=512584 Originator: NO Either replace "<iostream>" with "<stdio.h>" or rename Hello.c to Hello.cpp and compile with the "g++" command. Also, to see where the compiler is looking for header files, try these: echo '#include <stdio.h>' | gcc -H -E -xc | less echo '#include <iostream>' | g++ -H -E -xc++ | less ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1708364&group_id=2435 |