I am in g++ or gcc 3.4.4 (tested on both linux ubuntu kernel 3.6.8 and cygwin 1.5.18-1 dll on window xp-sp2)
I like to test and using the following .h (lib? I do not know yet to make it become lib) http://www.cs.duke.edu/~ola/ap/code/apstring.h by simple test program ------------------------------------------------------- #include <iostream> #include "/home/eric/apstring.h" using namespace std; int main() { apstring name; cout << "Enter your last name: " << endl; cin >> name; cout << name; return 0; } --------------------------------------------------------------- but compiler response error ---------- $ g++ pg88.C -o pg88 In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/iostream.h:31, from /home/eric/apstring.h:4, from pg88.C:4: /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. /cygdrive/c/DOCUME~1/ERICLI~1/LOCALS~1/Temp/ccKePRMx.o:pg88.C:(.text+0x167): undefined reference to `apstring::apstring()' /cygdrive/c/DOCUME~1/ERICLI~1/LOCALS~1/Temp/ccKePRMx.o:pg88.C:(.text+0x1a5): undefined reference to `operator>>(std::basic_istream<char, std::char_traits<char> >&, apstring&)' /cygdrive/c/DOCUME~1/ERICLI~1/LOCALS~1/Temp/ccKePRMx.o:pg88.C:(.text+0x1b8): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, apstring const&)' /cygdrive/c/DOCUME~1/ERICLI~1/LOCALS~1/Temp/ccKePRMx.o:pg88.C:(.text+0x1ca): undefined reference to `apstring::~apstring()' /cygdrive/c/DOCUME~1/ERICLI~1/LOCALS~1/Temp/ccKePRMx.o:pg88.C:(.text+0x1f4): undefined reference to `apstring::~apstring()' collect2: ld returned 1 exit status ------------------------------------------------------------- thanks in advance any advancer's advice or help charles _______________________________________________ Help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
