Results 1 to 3 of 3

Thread: Eclipse installation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Eclipse installation

    Hi,

    I am trying to get the HelloWorld program working on eclipse but it throws the following error

    **** Rebuild of configuration Debug for project HelloWorld ****

    **** Internal Builder is used for build ****
    g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc\HelloWorld.o ..\src\HelloWorld.cpp
    ..\src\HelloWorld.cpp:9:20: no include path in which to search for iostream
    ..\src\HelloWorld.cpp: In function `int main()':
    ..\src\HelloWorld.cpp:13: error: `cout' was not declared in this scope
    ..\src\HelloWorld.cpp:13: error: `endl' was not declared in this scope
    ..\src\HelloWorld.cpp:13: warning: unused variable 'cout'
    ..\src\HelloWorld.cpp:13: warning: unused variable 'endl'
    Build error occurred, build is stopped
    Time consumed: 72 ms.
    I have MinGW installed on Windows Vista.

    Can someone please help me in getting this working?

    Thanks a lot,
    Mithin

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Eclipse installation

    Missing include <iostream>? Missing "using std::cout;"?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eclipse installation

    Here is the code

    Qt Code:
    1. #include <iostream>
    2. using namespace std;
    3.  
    4. int main() {
    5. cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
    6. return 0;
    7. }
    To copy to clipboard, switch view to plain text mode 

    I am sure MinGW is installed fine because I am able to build Qt successfully. I suspect this has something to do with the project settings. I have set the include path (C:\MinGW\include) and the library path (C:\MinGW\lib) in the project properties but still get these errors.

    Please help
    Thanks a lot

Similar Threads

  1. Replies: 7
    Last Post: 22nd December 2010, 08:13
  2. Qt 4.3.2 + eclipse 3.3 first project building
    By christauffre in forum Newbie
    Replies: 2
    Last Post: 5th December 2007, 12:52
  3. Replies: 0
    Last Post: 21st September 2007, 11:08
  4. [MacOSX,eclipse CDT]want eclipse to know Qt classes
    By lolveley in forum Installation and Deployment
    Replies: 7
    Last Post: 27th July 2007, 23:52
  5. Howto use Eclipse with QT4 in 10 steps
    By the_bis in forum Newbie
    Replies: 3
    Last Post: 28th January 2007, 20:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.