posts - 36, comments - 30, trackbacks - 0, articles - 0

2009年12月4日

1:Broken shell detected. 重装了一遍msys,然后安装bash-3.1-MSYS-1.0.11-1
2:pr: command not found 需要coreutils
coreutils-5.97-2-msys-1.0.11-bin.tar.tar 无法打开,只好下载coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
3:make: *** No rule to make target `libavdevice/libavdevice.a', needed by `all'.  Stop.
update your make to 3.81+ 
make-3.81-MSYS-1.0.11-2.tar.bz2

 http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/

posted @ 2009-12-04 15:02 vcommon 阅读(533) | 评论 (0)编辑 收藏

2009年11月6日

修复socket.
netsh winsock reset

posted @ 2009-11-06 18:57 vcommon 阅读(219) | 评论 (0)编辑 收藏

首先编译wxwidget,设置WXDIR

接下来错误
Creating C++ source from XML resource file

发现wxwidget没有生成bin目录,原因wxrc需要另外编译.
http://docs.wxwidgets.org/stable/wx_contents.html

 nmake -f makefile.vc BUILD=release UNICODE=1 RUNTIME_LIBS=static
\wxWidgets-2.8.10\wxWidgets-2.8.10\lib\vc_lib\msw
头文件加进环境变量

posted @ 2009-11-06 12:51 vcommon 阅读(651) | 评论 (2)编辑 收藏

调试OPAL的时候出现的,编译都正常,最后运行出现R6034.
 网上找的方法,搞定
#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.VC90.CRT' version='9.0.30729.1' processorArchitecture='X86' publicKeyToken='1fc8b3b9a1e18e3b' language='*'\"")

posted @ 2009-11-06 11:09 vcommon 阅读(414) | 评论 (0)编辑 收藏

2009年11月5日

perl Configure VC-WIN32
请注意大小写

我就是用得小写.然后以为运行成功了,其实没有.


error C2220: warning treated as error
ntdll.mak
CFLAG= /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DOPENSSL_USE_APPLINK -I. /Fdout32dll -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5   
去掉 /WX

posted @ 2009-11-05 18:23 vcommon 阅读(330) | 评论 (0)编辑 收藏

2009年3月20日

http://www.mingw.org/wiki/msys

1:下载MinGW-5.1.4.exe
运行,自动下载并安装

2:MSYS-1.0.10.exe 安装
3:msysDTK-1.0.1.exe 安装
4:msysCORE-1.0.11-2007.01.19-1.tar.bz2
msysCORE是补丁,所以覆盖在源安装上,下同
5:bash-3.1-MSYS-1.0.11-1.tar.bz2
6:coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
      csmake-3.81-MSYS-1.0.11-2.tar.bz2
7:....还有不少,不过现在没装
8:m4-1.4.7-MSYS.tar.bz2
9:以下是工具:../path/to/configure --prefix=/mingw && make && make install
       autoconf-2.63.tar.bz2.tar
10:automake-1.10.1.tar.bz2.tar
11:libtool-2.2.tar.gz.tar
fatal error LNK1104: cannot open file "LIBC.lib"
error: C compiler cannot create executables
需要设置环境变量
set PATH=C:\MSDEV\VC98\BIN;C:\MSDEV\COMMON\MSDEV98\BIN ;mingw....
set INCLUDE=C:\MSDEV\VC98\INCLUDE
set LIB=C:\MSDEV\VC98\LIB
12: /etc/profile
PKG_CONFIG_PATH="/mingw/lib/pkgconfig"
CVS_RSH=ssh
CFLAGS="-pipe -O2 -mms-bitfields -march=i686"
just before

export HOME LOGNAME MSYSTEM HISTFILE
export HOME LOGNAME MSYSTEM HISTFILE CFLAGS PKG_CONFIG_PATH CVS_RSH

To install 3rd party library and applications which uses the autotools build system the following commands are often used.
./configure --prefix=/mingw
make
make install
13:gtk+-bundle_2.16.0-20090317_win32
add to path gtk+-bundle_2.16.0-20090317_win32\bin
14:glib-2.20.0
./configure --prefix=/mingw
make
make install
gettext error
15:将 gtk+-bundle_2.16.0-20090317_win32得include ,lib copy到E:\MinGW中
其实应该是设置好PKG_CONFIG_PATH,懒省事,就直接copy了
16:gtk+-2.16.0
./configure --prefix=/mingw
make
make install

remove define #ifndef GTK_DISABLE_DEPRECATED

OK,搞定,花费一天时间。编译3小时

posted @ 2009-03-20 16:47 vcommon 阅读(3104) | 评论 (0)编辑 收藏

2009年3月13日

不允许重载函数“_interlockedbittestandreset”的第二个 C 链  将vs include file 改掉 __MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b)) __MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b)) build OK

posted @ 2009-03-13 11:29 vcommon 阅读(482) | 评论 (0)编辑 收藏

2009年3月6日

最近忽然研究了下DIV+javascript

DIV+javascript的拖动效果,层拖动,移动效果(兼容)
本篇文章来源于 - http://www.itokit.com - web开发技术 原文地址是:http://www.itokit.com/bbs/viewthread.php?tid=1751&highlight=

其实原理很简单,巧妙使用了css
DIV ,class

1:折叠: class .hide style
通过当前click的event,找到element,设置style为hide,产生效果折叠.
2:drag效果
onload保存全局body,html,初始化container...,对所有class name = module的li onmousedown添加javascript dragstart
dragstart时重载docoment的onmousemove,onmouseup....,将该element Drag.floatIt(e);Drag.drag(e);
floatIt将创建一个新Element,使用style module ghost,将drag element改到这个Element下,新Element,使用style float,然后drop这个ghost element
drop就比较繁琐点了。重新计算位置。因为insertBefore的参数原因,要计算当前elment和colume...。估计是可以优化的

 


<style type="text/css">
body,table,td,th,input,textarea,button,select{font:13px/16px Verdana,"宋体",sans-serif;}
table{border-collapse:collapse;}
p{margin:0px;}
.container{margin:8px;}
.column{width:33%;margin:0px;padding:0px;float:left;overflow:hidden;}
.module{margin:5px;padding:0px;border:1px solid #dcd;position:relative;background-color:white;list-style:none;}
.title{background-color:#edf;padding:1px 0px;width:100%;overflow:hidden;cursor:move;z-index:0;font-weight:bold;}
.cont{padding:3px;overflow:hidden;}
.hide .cont{display:none;}
.pageTitle{font-weight:bold;text-align:center;}
input.pageTitle{display:none;border:0px;padding:0px;width:100%;}
.webNote{background-color:#ffffe0;border:1px solid #ffffe0;}
textarea.webNote{display:none;overflow:hidden;padding:0px;border:0px;padding:0px;}
.ghost{border:1px dashed red;}
.float{position:absolute;z-index:100;margin:0px;padding:0px;overflow:hidden;list-style:none;-moz-opacity:.75;filter:Alpha(opacity=75);}
</style>

posted @ 2009-03-06 11:29 vcommon 阅读(574) | 评论 (0)编辑 收藏

2008年8月19日

 http://en.wikipedia.org/wiki/Alpha_compositing

The over operator is, in effect, the normal painting operation (see Painter's algorithm). The in operator is the alpha compositing equivalent of clipping.

As an example, the over operator can be accomplished by applying the following formula to each pixel value:

where Co is the result of the operation, Ca is the color of the pixel in element A, Cb is the color of the pixel in element B, and αa and αb are the alpha of the pixels in elements A and B respectively. If it is assumed that all color values are premultiplied by their alpha values (ci = αiCi), we can rewrite this as:

where

However, this operation may not be appropriate for all applications, since it is not associative ( i.e. it matters whether you first add object A and then object B or first B and then A. For example when building a picture from 3 color-channels it should not take effect in which order you add them, but with this non-associative version it would.). The associative version of this operation is very similar; simply take the newly computed color value and divide it by its new alpha value, as follows:




(转贴csdn zyl910(编程的乐趣在于编程控制硬件,与用图形学实现绚丽效果)

32位色下的颜色混合  
   
  R   =   R1   *   Alpha1   +   R2   *   Alpha2   *   (1-Alpha1)  
  G   =   G1   *   Alpha1   +   G2   *   Alpha2   *   (1-Alpha1)    
  B   =   B1   *   Alpha1   +   B2   *   Alpha2   *   (1-Alpha1)  
  Alpha   =   1   -   (1   -   Alpha1)   *   (   1   -   Alpha2)  
  R   =   R   /   Alpha  
  G   =   G   /   Alpha  
  B   =   B   /   Alpha  
   
   
   
  R1、G1、B1、Alpha1指上层的颜色值  
  R2、G2、B2、Alpha2指下层的颜色值  
  R、G、B、Alpha指合并后的颜色


7 楼gboy
使用   mmx   指令可以提高   alpha   混合的效率。  
   
  http://www.gbds.com.cn/news/files/tech/2002918132318.asp

posted @ 2008-08-19 14:26 vcommon 阅读(213) | 评论 (0)编辑 收藏

2008年8月7日

  《红楼梦》、《论语》、《水浒》、《西游记》、《三国演义》、《平凡的世界》、《孙子兵法》、《明朝那些事儿》、《庄子》、《西方哲学史》、《圣 经》、《金庸全集》、《诗经》、《鬼吹灯》、《鲁迅全集》、《君主论》、《世说新语》、《经济学原理》、《光荣与梦想》、《国富论》、《沉思录》、《宋词 三百首》、《万历十五年》、《唐诗宋词三百首》、《第五项修炼》、《政府论》、《社会契约论》、《胡适文集》、《围城》、《胡雪岩》、《细胞生命的礼 赞》、《复杂》、《王小波全集》、《哈姆雷特》、《张爱玲全集》、《新教伦理与资本主义精神》、《曾国藩家书》、《自私的基因》、《第三帝国的兴亡》、 《通往奴役之路》、《开放社会及其敌人》、《棋王》、《利维坦》、《古拉格群岛》、《老舍文集》、《一九八四》、《源泉》、《活着》、《沉重的肉身》、 《总统是靠不住的》、《三言两拍》、《从优秀到卓越》、《钢铁、细菌和枪炮》、《菊与刀》、《余英时文集》、《基业长青》、《莎士比亚全集》、《论美国的 民主》、《杰克伦敦小说选》、《约翰.克里斯朵夫》、《论人类不平等的起源和基础》、《麦田里的守望者》、《崩溃》、《野蛮生长》、《世界是平的》、《李 鸿章与晚清四十年》、《走向未来丛书》、《黑天鹅》、《动物庄园》、《战争与和平》、《精子战争》、《丑陋的中国人》、《百年孤独》、《基督山伯爵》、 《个人主义与经济秩序》、《丧家狗》、《时间简史》、《血酬定律》、《小王子》、《罗马帝国兴亡史》、《蝇王》、《傅雷家书》、《古文观止》、《悲惨世 界》、《全球通史》、《浮生六记》、《激荡三十年》、《赢》、《甘地传》、《儒林外史》、《出轨的王朝——晋朝历史的民间书写》、《契诃夫文集》、《人类 基因的历史地图》、《中国近百年政治史》、《自由秩序原理》、《走向世界——近代中国知识分子考察西方的历史》、《天朝的崩溃》、《劫梦惊魂》、《彼得 潘》、《科学史》

posted @ 2008-08-07 13:09 vcommon 阅读(265) | 评论 (0)编辑 收藏