超越自我

ubuntu 编译 codelblocks

Filed under: 应用软件 ; Tags: , — freeyun @ 2011-04-05 21:36:51

ubuntu 编译 codelblocks从svn有全插件

 sudo apt-get install build-essential

sudo apt-get install gdb

sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev

sudo update-alternatives –config wx-config
wx2.8-headers wx-common

cd trunk

./bootstrap

 

 ./configure --prefix=/opt/codeblocks-svn

or similar. Then you can later install a different build like:

 ./configure --prefix=/opt/codeblocks2-svn

followed by ‘make && make install’ as usual.

By default, CodeBlocks will not compile the contributed plugins from SVN. If you want to compile / install them too, replace the above ./configure command with:

 ./configure --with-contrib-plugins=all

Screenshot

参考:http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

gcc 4.60编译

Filed under: 应用软件 ; Tags: , — freeyun @ 2011-04-01 22:30:34

gcc 4.60编译

前提:gmp软件包,mpfr软件包,mpc软件包

./configure –prefix=/usr/gcc-4.6.0 –enable-languages=all –with-gmp=/usr/local/gmp –with-mpfr=/usr/local/mpfr –enable-libgomp

make

make install

 

报错缺少库的,请注意努力折腾

删除的就删除安装的目录,自动删除命令是没有

可以参考:http://gcc.gnu.org/install/

 

windows7下编译wxWidgets-2.8.11

Filed under: 应用软件 ; Tags: — freeyun @ 2011-02-27 00:33:45

第一步下codeblocks 及wxWidgets-2.8.11

第二步添加minGW环境变量D:\Program Files (x86)\CodeBlocks\MinGW\mingw32\bin;D:\Program Files (x86)\CodeBlocks\MinGW\bin;(路径是你的安装目录)

第三步进入D:\wxWidgets-2.8.11\build\msw

这里说明下,windows的cd  D:\wxWidgets-2.8.11\build\msw    (然后还要执行d:)

第四步 :mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1(这个就是建立调试编码的意思)

如果需要清理(mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 clean)

大家可以搜索下,是挺多资料的,我认为这个是较为简单的,所以写了出来,当然ubuntu下的编译也有,大家注意搜索。

如何在VS2010上执行C文件

Filed under: 应用软件 ; Tags: , — freeyun @ 2011-01-03 10:02:05

头疼,排版有问题

我们都知道vc6.0是可以的执行单个C文件的

下面我给截图设置VS2010的就可以了

第一步执行新建项目

第二步

对改项目右键修改属性

第三步设置看图片,设置没如何语言支持

第四步:新建C文件啦,注意看图片的新建的文件名字要.c

360和QQ两大流氓打架

Filed under: 应用软件 ; Tags: — freeyun @ 2010-11-03 22:40:30

中国的互联网发展成:最大的客户端软件和第二大客户端软件,两个都是大流氓,打架了,但是别拿用户做矛,用户去冲锋,太对不起用户。

坐看两大鸟打架,是件乐趣

360公司现在需要用户去“同情”,各位有可能去同情?当初金山网盾出,可牛杀毒软件5分钟就给360拦截。大量去推广前几天出的扣扣,无商业,的确这个是没有违QQ里面的用户协议,没商业,让用户去选择。但是这个软件是360开发的,

QQ也好不到那里,在感觉到360的威胁,在春节时,加班,在二线城市进行QQ医生升级,试图围剿360,360也感觉到,紧急找回员工反击。

以上是根据互联网获取的,笔者也不知道是否真实

今天的晚上更是精彩万分,终于爆发了,二选一,只能选择一个

ie9 beta

Filed under: 应用软件 ; Tags: — freeyun @ 2010-09-16 08:04:49

插图的时,IE9beta图出错无法插入到文章上。用了谷歌的浏览器才行了。ie9的图标挺漂亮的。发现它太消耗内存了。不知道有没有和我的windows7 sp1有没有存在关系。

(C语言)是否素数

Filed under: 应用软件 ; Tags: — freeyun @ 2010-07-28 23:02:03

程序是错的

#include <stdio.h>
#include <math.h>
void main()
{
 int prime(int); /*函数原型声明*/
 int n;
 printf(“\nInput an integer:”);
 if(prime(n))
  printf(“\n%d is a prime.”,n);
 else
  printf(“\n%d is not a prime.”,n);
 getch();
}
int prime(int n)
{
 int flag=1,i;
 for(i=2;i<n/2&&flag==1;i++)
  if(n%i==0)
   flag=0;
 return(flag);
}

正确的程序

#include <stdio.h>
#include <math.h>

int IsPrime(int n)
{
 int i;
for (i=2;i<=sqrt(n);i++)
if (n%i==0) return 0;
return 1;

}

main()
{int x;
 scanf(“%d”,&x);
if (IsPrime(x)==1)
 printf(“%d is a Prime number”,x);
else printf(“%d is not a prime number”,x);
getch();
}

windows程序运行原理

Filed under: 应用软件 ; Tags: , — freeyun @ 2010-04-11 01:30:41

本想睡觉的,同学给了个电话过来,问了下网站数据库的链接问题,解答,就没再想着去睡觉,前天的时候看熬夜不好! 最近温故而知新,学习VC++,总结一下下,心得,不保证是权威 Windows系统提供了各种API(应用程序的编程接口),是由操作系统本身提供,你可能听说过MFC,SDK,其实MFC是微软为了方便开发而封装的类,MF就是SDK的子集。当然APT函数多的,你不可能全部记住,使用要会使用MSDN,微软的帮助文档。 1.程序运行需要有入口函数即:Winmain函数 我们可以查看MSDN关于Winmain: int WINAPI WinMain(           HINSTANCE hInstance,  //当前的程序 句柄     HINSTANCE hPrevInstance, //存在兄弟句柄     LPSTR lpCmdLine,// 命令行参数     int nCmdShow  // 最大化,最小化 ); (more…)

Visual c++

Filed under: 应用软件 ; Tags: — freeyun @ 2009-06-12 05:59:51

Visual c++微软针对c++开发平台
实机操作基本完工
针对MFC的,至少了解完!当然受微软商业影响!对于C++多少还是有问题地方
下一步:读C++设计思想
进而C++是如何给创造出来的
最后精通c++
去分析其他优秀语言
巅峰:能够进行新程序语言的设计

wiki install Fatal error

Filed under: 应用软件 ; freeyun @ 2009-03-26 14:27:01

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 7680 bytes) in /var/www/wiki/includes/parser/Preprocessor_DOM.php on line 1285

估计有要20MB内存,但是在php.ini脚本运行最高也是16MB。强制改为32MB也不行,倒是换english就不会出错。