Hello Tommi,

Great, thanks.  That's neat that you ported cxxlog.  The logging
facility is really good for debugging application code, and
seeing what is happening in tntdb and tntnet.

cxxtools and tntdb (in subversion) compile fine.  tntdb runs fine
in simple tests.

In testing I found 2 little things with tntnet in subversion:

(1) A simple packaging glitch, it forgets to install a header
file, the compiler complains like:

Error: Could not open include file<tnt/objecttemplate.h>.

Which is easy to fix:

goanna% svn diff tntnet
Index: tntnet/framework/common/Makefile.am
===================================================================
--- tntnet/framework/common/Makefile.am (revision 987)
+++ tntnet/framework/common/Makefile.am (working copy)
@@ -82,6 +82,7 @@
        tnt/multipart.h \
        tnt/object.h \
        tnt/objectptr.h \
+       tnt/objecttemplate.h \
        tnt/parser.h \
        tnt/poller.h \
        tnt/query_params.h \
goanna% 

Then I did:

% gmake clean
...
% autoreconf --install --force
...
% ./configure --prefix=/h/goanna/1/s_5.10_m64/c --with-ssl=openssl
...
% gmake
...
# gmake install
...

(2) The program below compiles fine with Tntnet 1.6.1 and cxxtools 1.4.6.
With tntnet and cxxtools in subversion the compiler complains that the
generated .cpp file from ecppc references createNew which is not
a member of tntnet::Scope:

-*- mode: compilation; default-directory: 
"/h/goanna/2/eng/dev/tntnet/wizard3/wizard/" -*-
Compilation started at Fri Feb 22 22:50:37

gmake
ecppc -m text/html -L  wizard.ecpp
CC -g -xdebugformat=stabs -xs -mt -library=stlport4 -xtarget=opteron -m64 -Kpic 
-features=tmplife -features=tmplrefstatic  -I/h/goanna/1/s_5.10_m64/c/include 
-I/usr/xpg4/include -I/usr/sfw/include 
-I/h/goanna/1/oracle/oracle/product/10.2.0/db_1/rdbms/public  -c -o wizard.o 
wizard.cpp
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 38: 
Warning: The variable tmp has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 87: 
Warning: The variable ret has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 109: 
Warning: The variable old has not yet been assigned a value.
"wizard.cpp", line 54: Warning:::_component_wizard::page0_type::operator() 
hides the virtual function tnt::Component::operator()(tnt::HttpRequest&, 
tnt::HttpReply&, tnt::QueryParams&, bool).
"wizard.cpp", line 67: Warning:::_component_wizard::page1_type::operator() 
hides the virtual function tnt::Component::operator()(tnt::HttpRequest&, 
tnt::HttpReply&, tnt::QueryParams&, bool).
"wizard.cpp", line 80: Warning:::_component_wizard::page2_type::operator() 
hides the virtual function tnt::Component::operator()(tnt::HttpRequest&, 
tnt::HttpReply&, tnt::QueryParams&, bool).
"wizard.cpp", line 85: Warning:::_component_wizard::operator() hides the 
virtual function tnt::Component::operator()(tnt::HttpRequest&, tnt::HttpReply&, 
tnt::QueryParams&, bool).
"wizard.cpp", line 142: Error: createNew is not a member of tnt::Scope.
"wizard.cpp", line 154: Error: createNew is not a member of tnt::Scope.
"wizard.cpp", line 166: Error: createNew is not a member of tnt::Scope.
3 Error(s) and 7 Warning(s) detected.
gmake: *** [wizard.o] Error 3

Compilation exited abnormally with code 2 at Fri Feb 22 22:50:37

wizard.ecpp:
<%pre>
#include "ServerSessionState.h"
</%pre>

<%session scope="page">
int page_no;
</%session>

<%cpp>
ServerSessionState *sss = (ServerSessionState *)0;
switch(page_no)
{
  case 0:
  default:
  {
</%cpp>
  <& page0(sss_p = sss) qparam&>
<%cpp>
  }
  break;
  case 1:
  {
</%cpp>
  <& page1(sss_p = sss) qparam&>
<%cpp>
  }
  break;
  case 2:
  {
</%cpp>
  <& page2(sss_p = sss) qparam&>
<%cpp>
  }
  break;
}
</%cpp>

<%def page0>
<%param>
ServerSessionState *sss_p; // define a named parameter
</%param>
<html>
 <head>
  <title>page0</title>
 </head>
 <body>
  <h1>page0</h1>
 </body>
</html>
<%cpp>
page_no = 1;
</%cpp>
</%def>

<%def page1>
<%param>
ServerSessionState *sss_p; // define a named parameter
</%param>
<html>
 <head>
  <title>page1</title>
 </head>
 <body>
  <h1>page1</h1>
 </body>
</html>
<%cpp>
page_no = 2;
</%cpp>
</%def>

<%def page2>
<%param>
ServerSessionState *sss_p; // define a named parameter
</%param>
<html>
 <head>
  <title>page2</title>
 </head>
 <body>
  <h1>page2</h1>
 </body>
</html>
<%cpp>
page_no = 0;
</%cpp>
</%def>

ServerSessionState.h:
#ifndef SERVER_SESSION_STATE_H
#define SERVER_SESSION_STATE_H

class ServerSessionState
{
  int something;

public:
  ServerSessionState() :
    something(0)
  {
  }
};

#endif

Makefile:
SUFFIXES=.ecpp .gif .jpg .css .js .png
ECPPC=ecppc
ECPPL=ecppl
ECPPLL=ecppll
ECPPFLAGS=-L
CXX=CC

TNTNET_LIBS=-ltntnet -lcxxtools
LIBS=$(TNTNET_LIBS)

S_5_10_M64_ROOTDIR=/h/goanna/1/s_5.10_m64
TNTNET_ROOTDIR=$(S_5_10_M64_ROOTDIR)/c
ORACLE_BASE=/h/goanna/1/oracle
ORACLE_HOME=$(ORACLE_BASE)/oracle/product/10.2.0/db_1
CPPFLAGS=-I$(TNTNET_ROOTDIR)/include -I/usr/xpg4/include -I/usr/sfw/include 
-I$(ORACLE_HOME)/rdbms/public
CXXFLAGS=-g -xdebugformat=stabs -xs -mt -library=stlport4 -xtarget=opteron -m64 
-Kpic -features=tmplife -features=tmplrefstatic # -features=no%anachronisms 
-features=tmplife +w2
LDFLAGS=-L$(TNTNET_ROOTDIR)/lib -L/usr/xpg4/lib/amd64 -L/usr/sfw/lib/amd64 
-L$(ORACLE_HOME)/lib -R$(TNTNET_ROOTDIR)/lib -R/usr/xpg4/lib/amd64 
-R/usr/sfw/lib/amd64 -R$(ORACLE_HOME)/lib

wizard.so: wizard.o
        $(CXX) $(CPPFLAGS) $(CXXFLAGS) -G -o $@ $(LDFLAGS) $^ $(LIBS)

wizard.cpp: wizard.ecpp
        $(ECPPC) -m text/html $(ECPPFLAGS) $(ECPPFLAGS_CPP) $<

.PRECIOUS: wizard.cpp

%.cpp: %.ecpp
        $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $<
%.cpp: %.gif
        $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_GIF) -b $<
%.cpp: %.jpg
        $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JPG) -b $<
%.cpp: %.css
        $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b $<
%.cpp: %.js
        $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JS) -b $<

clean:
        rm wizard.cpp *.o

Thanks very much,

Mark

-- 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to