Community
Participate
Working Groups
Build Identifier: 20110916-0149 I Have chosen File>New>Project>C/C++Project>C++Project>HelloWorld Project, Tools chain as MinGW. I got the HelloWorld.cpp. I pressed Ctrl+B, then I got errors in my console window as gvn below **** Build of configuration Debug for project test **** **** Internal Builder is used for build **** g++ -o test.exe src\test.o c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -ladvapi32 c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lshell32 c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -luser32 c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lkernel32 collect2: ld returned 1 exit status Build error occurred, build is stopped Time consumed: 482 ms. Kindly help me to build and run. Suggest me any user manual for this eclipse IDE for C/C++ Reproducible: Always
Please use Eclipse Community Forums http://www.eclipse.org/forums/ - Language IDEs - CDT, that is the appropriate place to ask questions like that and you are more likely to get answer there. Bugzilla is not used for user help but for tracking CDT tooling development itself.
I think this bug is valid. The problem isn't that the user hasn't set up their environment properly (requiring them to seek help in a forum), it's that CDT has failed to communicate what is wrong and how to fix it, or to just work out of the box as it should. I'm an experienced developer, I've even written CDT code, and it's baffling to me that I can download CDT from the update site on Windows (***Still run by 87.97% of all desktops on the planet***), switch to the C/C++ perspective, select File > New > C/C++ Project < HelloWorld C++ Makefile Project, Next, give my project a name, Finish, right click on the project and select Run As > Local C++ Application, and *nothing works*. - Why didn't I get a validation error in the C++ project wizard when I had no Toolchain installed, -- Other Toolchain-- selected by default, and no configuration for said "other toolchain" provided or even asked for at any point? - How does the error message "Program make not found in PATH" tell me what to do next? Sure, it's "accurate", but what would that mean to a college student who's younger than make itself? They'll just run to Java or Python. - Why is my new C++ project written in C? with puts("Hello World!!!"); instead of cout << "Hello World!!!"; - Why does Run As appear to make no attempt at building my project first? Not that knowing to run Build All first helps without a toolchain. Please reopen this bug, I'll work on it myself if necessary.
Hi Marc. I think those are all valid observations/suggestions. It would make sense to address them in individual bugs as they are all pretty independent and patches would be more likely to be accepted quickly. About the last point, there is bug 414818 that I created, I should look into revisiting the patch!
Yes Marc, would be awesome if you fix all of this but I it should be new bug(s) as Marc-Andre pointed out (or they were probably already reported one way or another already), this one actually has toolchain but cannot find libs which I don't even know what causes it.
FWIW, the Wascana MinGW install is about to make a comeback. That will install the MinGW toolchain and build environment into the Eclipse environment to make this a lot easier for users. Stay tuned here: https://sourceforge.net/projects/wascana/ I also need to redo the CDT new project wizard. It's too hard to get this set up properly the way it is currently.
What about LLVM? It seems more structured, and licensed in a way that could be shipped directly with Eclipse instead of wrapping GPL tools?
(In reply to Marc Gobeil from comment #6) > What about LLVM? It seems more structured, and licensed in a way that could > be shipped directly with Eclipse instead of wrapping GPL tools? You can make it your incubation project :) If only compiler available we can only do managed projects, to have command build line build environment you still need mingw (i.e. for make and command line friends). You also need a non-gnu debugger (I think there is one windows native debugger in our of the cdt subprojects) But the fact that we cannot ship gnu stuff does not meant we cannot acquire it, via nice out of box wizard.
(In reply to Marc Gobeil from comment #6) > What about LLVM? It seems more structured, and licensed in a way that could > be shipped directly with Eclipse instead of wrapping GPL tools? CDT already has support for LLVM. I'm using it on my Mac. On Mac and Linux this is a much easier problem since the toolchains (once you install them) are located on the PATH. I haven't heard of an LLVM distribution for Windows that we could redistribute.
Re: LLVM, I downloaded clang for Windows from here http://llvm.org/releases/download.html (only available in prebuilt binary for second most recent version, 3.4.1 at the moment) and it seemed to work, I just didn't get as far as hooking it into a build system. I figured that even if I got it to work, I'd probably run into problems with Windows not being POSIX compliant or something (perhaps not a correct assumption anymore: http://stackoverflow.com/questions/4746043/where-does-microsoft-windows-7-posix-implementation-currently-stand), soooo I spent a couple days organizing and backing up all my files to open up a partition to install Ubuntu, Eclipse, and CDT. Created a new C++ hello world project and... got the "no binary" error, built project manually, then got the errors: - make: *** [src/HelloWorld.o] Error 127 - Program "g++" not found in PATH - Symbol 'cout' could not be resolved - Symbol 'endl' could not be resolved - Symbol 'std' could not be resolved
- ran sudo apt-get install build-essential - ran a build in eclipse, only the first error went away - had to restart eclipse to get it to recognize the change to my path (was just a lucky guess)