Running Ubuntu 22.04
Installed eclipse-cpp-2022-12-R-linux-gtk-x86_64
Installed Meson via the ubuntu repository
The issue is that I cannot compile the application when using iostream. If it is an eclipse configuration issue, could you direct me how to properly configure eclipse?
Thanks.
I created a stock c++ project with accompanying stock code
#include <stdio.h>
int main(int argc, char **argv) {
printf("Hello World\n");
return 0;
}
Everything compile well and run as expected.
I then changed the code to use iostream and it fails to compile
#include <iostream>
int main(int argc, char **argv) {
std::cout << "hello world via cout" << '\n';
return 0;
}
The console output show...
Building in: /home/wt/user1/myworkspace/test-cpp/build/default
[1/2] cc -Itest-cpp.p -I. -I../.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -MD -MQ test-cpp.p/test-cpp.c.o -MF test-cpp.p/test-cpp.c.o.d -o test-cpp.p/test-cpp.c.o -c ../../test-cpp.c
FAILED: test-cpp.p/test-cpp.c.o
cc -Itest-cpp.p -I. -I../.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -MD -MQ test-cpp.p/test-cpp.c.o -MF test-cpp.p/test-cpp.c.o.d -o test-cpp.p/test-cpp.c.o -c ../../test-cpp.c
../../test-cpp.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Build complete: /home/wt/user1/myworkspace/test-cpp/build/default