[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Still Getting Errors With C++



I've been getting errors trying to compile a simple socket application using
c++.  The same application compiles and runs okay as a .c file.  I took
Mikael's advice and compiled using g++, but it seems that the compiler
figures out whether to compile c or c++ based on whether the extension is .c
or .cpp.

The errors relate to trying to use socket functions, bind(), listen(),
select() etcetera.  It looks like the compiler is looking for these
functions in different libraries or something like that.  It also looks like
it can't find the proper prototype for the functions.  Firstly, the compiler
complains about the data types that I'm passing to the function.  If I put a
prototype at the start of the file, the compiler then complains that there
is an undefined reference to these functions.


Dan