This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In main.cpp #include <cstdio> #include <cstdlib> int main(int argc, char** argv) { const int buf_size = 128; char buf[buf_size]; std::snprintf(buf, buf_size, "Error in"); <<== Unable to resolve identifier return (EXIT_SUCCESS); } g++ -std=c++0x -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp mkdir -p dist/Debug/GNU-Linux-x86 g++ -std=c++0x -o dist/Debug/GNU-Linux-x86/cppapplication_1 build/Debug/GNU-Linux-x86/main.o BUILD SUCCESSFUL (total time: 232ms) ----------------------------- Additional: ----------------------------- yura@suse:~> g++ -v Using built-in specs. Target: x86_64-suse-linux .... gcc version 4.4.1 [gcc-4_4-branch revision 150839] (SUSE Linux)
In main.cpp #include <stdlib.h> #include <cstdio> void myfunc() {} namespace std { using ::myfunc; using ::snprintf; } int main(int argc, char** argv) { std::myfunc(); <<== Unable to resolve identifier myfunc return (EXIT_SUCCESS); } g++ -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp mkdir -p dist/Debug/GNU-Linux-x86 g++ -o dist/Debug/GNU-Linux-x86/cppapplication_1 build/Debug/GNU-Linux-x86/main.o BUILD SUCCESSFUL (total time: 484ms) ------------------------------------------------------------------------------ In main.cpp ( Version without namespace std {using ::myfunc;} ) #include <stdlib.h> #include <cstdio> void myfunc() {} int main(int argc, char** argv) { std::myfunc(); <<==Ok, Unable to resolve identifier myfunc return (EXIT_SUCCESS); } g++ -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp main.cpp: In function ‘int main(int, char**)’: main.cpp:23: error: ‘myfunc’ is not a member of ‘std’ BUILD FAILED (exit value 2, total time: 280ms)
The last was checked on NetBeans IDE Dev (Build 200912240201)
http://hg.netbeans.org/cnd-main?cmd=changeset;node=1ac0592aa5d6