
Sorry to rehash an old thread,
I must be only person that just can not get this to work....
here is my build output:
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/etienne/NetBeansProjects/mingle'
mkdir -p build/Debug/GNU-Linux-x86
g++ -c -g -o build/Debug/GNU-Linux-x86/main.o main.cc
mkdir -p build/Debug/GNU-Linux-x86
g++ -c -g -o build/Debug/GNU-Linux-x86/server.o server.cc
mkdir -p build/Debug/GNU-Linux-x86
g++ -c -g -o build/Debug/GNU-Linux-x86/client.o client.cc
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/mingle
build/Debug/GNU-Linux-x86/main.o build/Debug/GNU-Linux-x86/server.o
build/Debug/GNU-Linux-x86/client.o -lpthread
build/Debug/GNU-Linux-x86/server.o: In function `mingle::server::accept()':
/home/etienne/NetBeansProjects/mingle/server.cc:36: undefined reference
to `mingle::server::handle_accept(mingle::client*, asio::error_code const&)'
collect2: ld returned 1 exit status
make[1]: *** [dist/Debug/GNU-Linux-x86/mingle] Error 1
make[1]: Leaving directory `/home/etienne/NetBeansProjects/mingle'
make: *** [.build-impl] Error 2
Build failed. Exit value 2.
Here is the code that complains:
void server::accept(
){
client* connection = new client(
acceptor_.io_service());
client_.push_back(connection);
acceptor_.async_accept(connection->socket(),
boost::bind(&mingle::server::handle_accept,
this,connection,asio::placeholders::error));
};//accept
void handle_accept(
client* connection,
const asio::error_code& ec
) {
};//handle_accept
The header file:
namespace mingle {
class server {
public:
server(
asio::io_service&,
short
);
~server() throw();
private:
void accept();
void handle_accept(
client*,
const asio::error_code&
);
std::vector