'da basit C++ programı derlenemiyor Terminalde basit bir program oluşturmaya çalıştım.Ubuntu
/usr/include/features.h:323:26: error: bits/predefs.h: No such file or directory
/usr/include/features.h:356:25: error: sys/cdefs.h: No such file or directory
/usr/include/features.h:388:23: error: gnu/stubs.h: No such file or directory
In file included from test.cpp:2:
/usr/include/stdlib.h:42:29: error: bits/waitflags.h: No such file or directory
/usr/include/stdlib.h:43:30: error: bits/waitstatus.h: No such file or directory
/usr/include/stdlib.h:320:49: error: sys/types.h: No such file or directory
In file included from test.cpp:2:
/usr/include/stdlib.h:35: error: ‘__BEGIN_DECLS’ does not name a type
/usr/include/stdlib.h:102: error: expected constructor, destructor, or type conversion before ‘;’ token
/usr/include/stdlib.h:113: error: ‘__END_NAMESPACE_STD’ does not name a type
/usr/include/stdlib.h:122: error: expected constructor, destructor, or type conversion before ‘;’ token
/usr/include/stdlib.h:140: error: expected constructor, destructor, or type conversion before ‘extern’
/usr/include/stdlib.h:145: error: expected constructor, destructor, or type conversion before ‘extern’
/usr/include/stdlib.h:149: error: expected initializer before ‘__THROW’
/usr/include/stdlib.h:152: error: expected initializer before ‘__THROW’
/usr/include/stdlib.h:153: error: ‘__END_NAMESPACE_STD’ does not name a type
/usr/include/stdlib.h:160: error: ‘__END_NAMESPACE_C99’ does not name a type
/usr/include/stdlib.h:168: error: ‘__END_NAMESPACE_STD’ does not name a type
liste bu şekilde devam eder:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("TESTING");
return 1;
}
ben g ++ -o Test test.cpp
hataları koştu. Birinin bu işi yapmak için yapmadığım şeyi göstermesini umuyorum.
'g ++ --verbose -o test testi.cpp' size ne veriyor? – genpfault
http://ubuntuforums.org/showthread.php?t=1877944 adresinin –
yardımcı olup olmadığını sorunum. Ayrıntılı çıktıyı kontrol ettim ve yolu basitleştirmeye karar verdim. Sadece /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Program şimdi derlenmiş, ancak çalıştırıldığında hiçbir şey çıkmıyor . Bu normal mi? –