2010年2月24日 | 分类: Windows | 标签: , ,

Visual Studio2008编译错误error C2259 cannot instantiate abstract class

经过检查,发现源代码中确实已经派生了虚函数,派生的虚函数源文件也正常编译。

最后在微软的官方网站上找到了答案(可能只是error C2259其中一种可能的原因,供参考):

This behavior is by design with VS 2005. The root cause is because wchar_t is a different type than unsigned short though in prior versions of Visual C++, the compiler considered them to be the same type. In this sample code, the type library uses unsigned short but the C++ source files use wchar_t. So the types don’t match therefore the functions that contain these types in their signatures don’t override the interface.

在VS 2005/VS2008中,wchar_t和unsigned short是不同的类型,尽管在之前的Visual C++版本中编译器将两者视为了相同的类型。由于参数类型的不匹配导致编译器无法正确地识别或编译重载的接口。

To continue working with this sample, either correct the type mismatch or use the /Zc:wchar_t- compiler switch to force the compiler to consider wchar_t the same type as unsigned short.
In the VS 2005 project property properties, under the C/C++ node, select Language. Then change “Treat wchar_t as Built-In Type” from “Yes” to “No”.
解决办法:使用/Zc:wchar_t-编译选项强制让编译器将wchar_t 和 unsigned short视为相同类型。或者在VS 2005/VS2008中,将项目属性中将”Treat wchar_t as Built-In Type”一项设置为”No”.

微软相关链接地址:

http://connect.microsoft.com/VisualStudio/feedback/details/101072/error-c2259-cannot-instantiate-abstract-class#

2010年2月7日 | 分类: Linux | 标签: ,

ubuntu 9.10开机自动挂载NTFS分区我们这里介绍的图形界面工具是:

ntfs-config

你可以通过软件包管理器来安装它,或者打开一个终端,然后运行如下的命令:sudo apt-get install ntfs-config

这个工具非常简单,枚举出你当前所有的ntfs分区,你可以更改或者指定每个分区的挂载点。

ntfs-config 配置开机自动挂载ntfs分区

ntfs-config 配置开机自动挂载ntfs分区

2010年1月31日 | 分类: Linux | 标签: ,

ubuntu9.10安装成功后,默认会打开声卡的省电功能,而这种省电功能给我的Lenovo 10笔记本带来了烦人的噪声。

When ubuntu9.10 was installed successfully, audio power saving mode will be enabled by default, but this function brings boring pop noise to my Lenovo 410 Laptop.

下面的命令用来,关闭声卡的自动省电功能:

Following command can be used for disabling the audio power saving mode:

echo 0 > /sys/module/snd_hda_intel/parameters/power_save

注意: 请注意shell的格式, > 符号两边的空格需要保留。

Notice: Please pay attention to the shell command, spaces around ‘>’ should be kept.

为了让上面的脚本在每次开机的时候运行,我们需要把它添加到/etc/rc.local,这个操作需要root权限。

In order to run the script at start up, we need to add this script to /etc/rc.local. You need to be root to modify this file.

Reference Link:

http://ubuntuforums.org/archive/index.php/t-1341325.html

2010年1月31日 | 分类: Linux | 标签: ,

Ubuntu 9.10自带的中文输入法配置有问题,本文介绍大家如何修改配置:

1. 系统菜单选择: 系统-首选项-Ibus选项

2. 在”Ibus选项”对话框上 切换到第二个选项卡<输入法>上

3. 点“选择输入法”- 选择“汉语”, 再点添加即可,如果不用其他的输入法的可以直接删除。

4. 重启一下Ibus就可以用我们刚刚添加的拼音输入法了。

附图:

Ibus  pinyin 输入法配置

Ibus pinyin 输入法配置

原文引用地址:

http://hi.baidu.com/xiangbing911/blog/item/53623a45ce2cec88b2b7dc80.html

2010年1月30日 | 分类: Linux | 标签: , ,

测试通过的配置环境: ubuntu8.04, ubuntu9.10

1. 快捷键 Alt+F2 打开运行对话框,在运行对话框中输入

gconf-editor

点击运行按钮,打开“配置编辑器”。

2. 在“配置编辑器”中定位如下键值:

/apps/nautilus/desktop/trash_icon_visible

/apps/nautilus/desktop/computer_icon_visible

勾选上面两项,即可。

附图:

gconf-editor 配置桌面显示回收站图标

gconf-editor 配置桌面显示回收站图标

2010年1月25日 | 分类: Linux | 标签: , ,

UNetbootin是个 很 好用 的 工具,可以方便地 用来将 下载的 Linux Live CD拷贝到 优盘上面 ,并且 可以将 其配置为 引导盘.

UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. You can either let it download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you’ve already downloaded one or your preferred distribution isn’t on the list.

unetbootin creates bootable usb driver

unetbootin create bootable usb driver

Website:  http://unetbootin.sourceforge.net/

Canonical URL by SEO No Duplicate WordPress Plugin