LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1005|回复: 8

初次发贴:FC5字体/MP3/wxWidgets问题

[复制链接]
发表于 2006-4-19 11:49:14 | 显示全部楼层 |阅读模式
不知道大家有没有碰到过这两个问题:

    1.FC5经常出现不能输入的问题,不论中文英文,连退格键都不起作用,切换输入法也不起作用。必须将应用关闭后重新打开。
    2.xmms和mplayer(使用yum安装的)可以播放MP3,但当列表播放到第二首歌时,弹出对话框告诉我因为解码器的授权和Redhat的父授权冲突,将移去解码器,然后就不能继续播放,只能重起mplayer才行。

    对了,还有个Eclipse+CDT+wxWidgets在FC5的GCC4.1下的问题。编译wxWidgets库没有问题,但编译demo时有两个通不过。在Eclipse中自行编译时也不行,告诉我大量的语法错误和结构未定义 。使用managed c++ project,include和lib路径都已正确设置,相似的设置,我在windows下使用Eclipse+CDT+wxWidgets时用的很好。

    刚来,不懂的很多,有知道的朋友请告之,不胜感谢。
发表于 2006-4-19 14:28:38 | 显示全部楼层
我也是新手,帮你顶。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-19 20:28:56 | 显示全部楼层
呵呵,这位大哥都注册一年了,哪是我一天可比的哦,谢啦。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-20 21:11:36 | 显示全部楼层
第三个问题基本解决了,贴出来给大家参考一下。
The "All Options" Textfield is in Eclipse CDT 3.0.0 no longer editable, instead you have to follow these instructions:

Create a new, managed C++ project. Add a new file to the project (i.e. "main.cpp" ), and go to project properties. Select "C/C++ Build" and then "Tool Settings". Select now "GCC C++ linker" and add the string "`wx-config --libs`" behind the "g++" in the "Command" field . Open a console and type: "wx-config --cxxflags" for g++ compiler or "wx-config --cflags" for gcc. I get the output: "-I/usr/lib/wx/include/gtk2-ansi-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"

Select now "reprocessor". For every string in the output starting with "-D" click on the "Add" Button in the "Defined Symbols" field and fill in the string WITHOUT the leading "-D" ( CDT add it automatically ). I add the following strings: "GTK_NO_CHECK_CASTS", "__WXGTK__", "_FILE_OFFSET_BITS=64", "_LARGE_FILES"

Select now "Directories". For every string int output starting with "-I" lick on the "Add" Button in the "Include Path" field and fill in the string WITHOUT the leading "-I" ( CDT add it automatically ).

So i add the directories : "/usr/lib/wx/include/gtk2-ansi-release-2.5", "/usr/include/wx-2.5".

    这是老外推荐的方法,不过在现在的版本下还是不行的。编译是可以,但连接通不过。后来发现是CDT在命令行中将.o文件放在库的后面造成的。没有发现managed project有可以将其反过来的方法,只有使用standard project自己写makefile就解决了。


第一个问题有人说升级,305M,太大了,有没有别的办法 ?
回复 支持 反对

使用道具 举报

发表于 2006-4-21 08:23:36 | 显示全部楼层
问题2,推荐bmp,fedora的extra库里就有,lvn的库里有mp3的解码插件。另外那里有合适的wma插件麻烦告诉一声。
问题1,我一直都是使用的fcitx,所有的版本我拿到手第一件事就是删掉自带的输入法,然后编译自己的fcitx。目前看来还没什么问题,关于输入法的启动,gnome2.14的会话管理里面很方便了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-22 05:48:55 | 显示全部楼层
谢了啊,呵呵,不过我想这不是用哪个软件来放的问题,我用任何一个播放器,比如xmms,只要一放MP3, 我的解码器就会被提示移去。我再试试你的方法,呵呵。
回复 支持 反对

使用道具 举报

发表于 2006-4-22 06:10:27 | 显示全部楼层
是不是 xmms 带的是虚拟的 MP3 解码器。你要装一个真正能用的?
(当年用的RH8好像就是这个样子的)
回复 支持 反对

使用道具 举报

发表于 2006-4-22 09:33:52 | 显示全部楼层
有个问题就是中文可以显示,就是有些不能显示出来怎么办?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-25 05:33:34 | 显示全部楼层
呵呵,我的mp3解码器是从mplayer下的essential codecs package,应该不是虚拟的吧?问一句,你说那个LFS是个什么东东啊?

    今天学着写了个makefile文件,在CDT下用wxWidgets的。如何将makefile文件放在工程目录下,将Debug和Release生成的中间文件分别放到这两个目录下可头痛了一晚上,还是没有解决。现在只有将.o文件放在工程目录下,用改一个变量值的方法来控制生成过程。没办法,初学,那些高级的东西看了头痛啊,呵呵。不过还是放到这里吧,也许有朋友会有用的。

# Author : hongbo jiang
# Choise build_version between release and debug to switch the builded version
# Before switch builded version, you should use "make clean" to remove all .o file.
project_name = cdt_template
project_version = 1.0.0
build_version = debug

debug_compile_parameter = -ggdb -g2 `/usr/wxGTK-2.6.3/buildgtk-d/wx-config --cxxflags`
debug_link_parameter = `/usr/wxGTK-2.6.3/buildgtk-d/wx-config --libs`
release_compile_parameter = `/usr/wxGTK-2.6.3/buildgtk/wx-config --cxxflags`
release_link_parameter = `/usr/wxGTK-2.6.3/buildgtk/wx-config --libs`

compile_parameter = $($(build_version)_compile_parameter)
link_parameter = $($(build_version)_link_parameter)
unittest_parameter = -L/usr/local/lib/libcppunit.a -lcppunit -ldl

object = HelloWorld.o

VPATH = ./src
backup_date = $(shell date +%F-%I)
backup_path = /Exchange/backup/cdt/$(project_name)/


.PHONY : all
all : $(object)
                @echo begin $(build_version) link...
                g++  -o ./$(build_version)/$(project_name) $(object) $(link_parameter)
                @echo flished $(build_version) link.

HelloWorld.o : HelloWorld.cpp HelloWorld.h
                g++ -c ./src/HelloWorld.cpp -o ./HelloWorld.o $(compile_parameter)


#unittest target use the project .o file output, and add test file to compile and link.
test_object = MyUnitTest.o
.PHONY : unittest
unittest : $(object) $(test_object)
                @echo begin link unittest...
                g++ -o ./unittest/$(project_name)_test $(test_object) $(unittest_parameter)
                ./unittest/$(project_name)_test
                @echo unittest finished.

MyUnitTest.o : MyUnitTest.cpp
                g++ -c ./src/MyUnitTest.cpp -o ./MyUnitTest.o


.PHONY : backup
backup:
                @echo begin backup...
                tar -vczf $(backup_path)$(backup_date).tar.gz makefile src
                @echo backup finished.
               

.PHONY : clean
clean:
                @echo begin clean...
                -rm -f ./*.o
                @echo clean finished.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表