Hunter的大杂烩 技术学习笔记

2005-10-29

安装了gcc3之后的注意

Filed under: C++,Linux — hunter @ 8:09 pm

编译程序前,需要设置环境变量
export CC=gcc3
export CXX=g++3
export CPP=/usr/local/gcc-3.4.4/bin/cpp
export CXXCPP=/usr/local/gcc-3.4.4/bin/cpp

编译boost的时候,需要加参数
1. bjam “-sGCC_ROOT_DIRECTORY=/usr/local/gcc-3.3.2”

some tips

Filed under: Linux — hunter @ 8:04 pm

Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/ld.so.conf’

安装axis c++版心得

Filed under: C++ — hunter @ 7:49 pm

先要准备好
Xerces C++ (2.2.0) XML parser
Apache ANT
Available from http://ant.apache.org
These scripts have been developed and tested using version 1.6.x
Java SDK – required for running of ANT scripts, and the compilation of WSDL2Ws tool
Require version 1.4+
Ant-Contrib – provide numerous extensions to ANT, including the compilation of C/C++.
Available from http://ant-contrib.sourceforge.net
Place JARs into [ANT INSTALL DIR]/lib.
Require both ant-contrib (v0.6) and cpptasks (v1.0beta3)
Doxygen – Used for generating API documentation
Available from http://www.doxygen.org
Compiler / Linker
gcc 2.95.3

以上软件的安装都比较简单,在axis文档中都描述,不多说了

以下是在编译axis之前必须设置的一些环境变量

#axis source的解压目录
export AXISCPP_HOME=/usr/local/src/axis-c-1.5.0-linux-src/
#axis binary 安装目录
export AXISCPP_DEPLOY=/usr/obj
export LD_LIBRARY_PATH=/usr/local/xerces/lib:$AXISCPP_DEPLOY/bin:$LD_LIBRARY_PATH
export ANT_HOME =/usr/local/ant/
export JAVA_HOME=/usr/local/java/
export XERCES_HOME=/usr/local/xerces/
export APACHE2_HOME=/usr/local/apache/
export AXISJAVA_LIB=/usr/local/src/axis-c-1.5.0-linux-src/lib/axisjava/
export AXIS_JARS_HOME=”$AXISCPP_HOME/lib/axisjava”
export AXIS_JARS=”$AXIS_JARS_HOME/axis-ant.jar:$AXIS_JARS_HOME/axis.jar:$AXIS_JARS_HOME/commons-discovery.jar:$AXIS_JARS_HOME/commons-logging.jar:$AXIS_JARS_HOME/jaxrpc.jar:$AXIS_JARS_HOME/log4j-1.2.4.jar:$AXIS_JARS_HOME/saaj.jar:$AXIS_JARS_HOME/wsdl4j.jar”
export CLASSPATH=”$CLASSPATH:./:$JAVA_HOME/lib:$AXIS_JARS:”

#以下是一些需要调整的编译选项,如果没有使用apache 1.3,就需要将apache13设置为false
Vi build/build.Linux.properties
server.apache13 = false
server.apache20 = true

#以下是编译失败的文件,需要做一些修改
src/transport/SOAPTransport.h
src/soap/xsd/IAnySimpleType.hpp
src/soap/xsd/DateTime.cpp
src/soap/xsd/Base64Binary.cpp
src/soap/xsd/NOTATION.cpp
src/wsdd/WSDDHandler.h
#以上文件需要添加 #include

#以下文件需要 change static_cast to (AXIS_PROTOCOL_TYPE)
src/cbindings/client/StubC.cpp
[cc] /usr/local/src/axis-c-1.5.0-linux-src/src/cbindings/client/StubC.cpp:41: static_cast from `AXISC_PROTOCOL_TYPE’ to `axiscpp::AXIS_PROTOCOL_TYPE’
[cc] /usr/local/src/axis-c-1.5.0-linux-src/src/cbindings/client/StubC.cpp: In function `void axiscSetTransportProtocol(void *, AXISC_PROTOCOL_TYPE)’:
[cc] /usr/local/src/axis-c-1.5.0-linux-src/src/cbindings/client/StubC.cpp:158: static_cast from `AXISC_PROTOCOL_TYPE’ to `axiscpp::AXIS_PROTOCOL_TYPE’
————————–>

2005-10-06

hhte road map

Filed under: HHTE — hunter @ 5:49 pm

1. 支持buffer
2. 支持if .. else .. fi
3. 支持内嵌函数
4. 支持最终结果 cache
5. 支持中间语法树cache
6. 优化binary size
7. 优化速度

hhte v1.0发布

Filed under: C++,Linux — hunter @ 5:44 pm

在原有的html template engine基础上,改写了语法分析功能,使用yacc/flex作为语法分析,以便提供更好的语法分析功能,并改名为“hunter’s html template engine” (hhte)
现在的功能类似一个script language(其实语法分析那块就是从PHP里面偷师回来的),跟原来最主要的区别就是,由于可以生成一个语法树,所以在output的时候,可以根据变量的替换顺序,自动把已经替换好的模板直接输出,以提高用户感,比如有一个html文件:
字符串A
变量A
字符串B
变量B

如果按以前的分析方法,需要把a,b都替换完之后,才一次性的output出去,但是使用了hhte之后,只要替换了变量a之后,程序会判断变量a之前是否还存在其他变量,如果没有,就将字符串a,变量a,字符串b一起输出
那用户的感觉就会页面显示速度很快了。
下载地址

Powered by WordPress