Unresolved in Eclipse, Ubuntu

后端 未结 2 1628
我寻月下人不归
我寻月下人不归 2021-01-04 01:15

Yes, it\'s this question again...

Somehow, I cannot get this issue resolved. Believe it or not, I have experience with Eclipse but only for Java de

相关标签:
2条回答
  • 2021-01-04 01:32

    The reason is that Eclipse simply cannot import a proper header. C++ iostream header in Ubuntu can be found:

    $: sudo find / -name iostream

    /home/beniamin/QtSDK/Madde/toolchains/arm-2009q3-67-arm-none-linux-gnueabi-x86_64-unknown-linux-gnu/arm-2009q3-67/arm-none-linux-gnueabi/include/c++/4.4.1/iostream
    /home/beniamin/QtSDK/Madde/sysroots/harmattan_sysroot_10.2011.34-1_slim/usr/include/c++/4.4/iostream
    /usr/share/gccxml-0.9/GCC/2.95/iostream
    /usr/include/c++/4.6/iostream
    /usr/include/boost/tr1/tr1/iostream

    So basically, I suppose the one you are looking for is /usr/include/c++/4.6/iostream, so you should in some place include this directory.

    Edit: You should also have installed g++, or simply install build-essential package, which is obligatory for building debian packages. Nevertheless, g++ should have been included in your Ubuntu installation anyway.

    0 讨论(0)
  • 2021-01-04 01:49

    Yes, I have found that using

    $: sudo find / -name iostream
    

    and adding the includes file in the includes path and then it success.

    0 讨论(0)
提交回复
热议问题