[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fastcgipp-users] linker problem
From: |
Goran |
Subject: |
[Fastcgipp-users] linker problem |
Date: |
Tue, 07 Apr 2009 13:11:38 +0200 |
Hi all,
I've started to test fastcgi++ 2.0 but already the first example (see
below) fails.
I've tried to compile with:
g++ Session.cpp -o session.fcgi -lfastcgipp -lboost_thread
And got:
/tmp/ccLPgcT6.o: In function `SessionExample::response()':
Session.cpp:(.text._ZN14SessionExample8responseEv[SessionExample::response()]+0xb):
undefined reference to `SessionExample::s'
collect2: ld returned 1 exit status
Why does the linker abort?
Thanks, Goran
// Session.cpp
#include <string>
#include <fastcgi++/request.hpp>
#include <fastcgi++/manager.hpp>
class SessionExample : public Fastcgipp::Request<char>
{
private:
typedef Fastcgipp::Http::Sessions<std::string> Sessions;
private:
bool response()
{
// clean expired session
s.cleanup();
out << "Content-Type: text/html; charset=ISO-8859-1\r\n\r\n"
<< "Test";
return true;
}
private:
static Sessions s;
Sessions::iterator si;
};
int main()
{
Fastcgipp::Manager<SessionExample> fcgi;
fcgi.handler();
}
- [Fastcgipp-users] linker problem,
Goran <=