我的目标是学习C++编程语言,在linux上做一个家庭作业项目,同时学习一些linux和c++。
我打算编写一个小型桌面应用程序来显示当前的网络流量(就像windows中的DU表)。我有以下问题:
PS:我知道这篇文章写着“想要成为”--我真的很兴奋能从一些c++开始。这篇文章将在黑暗中用更精确的questions.Hunting改写成一个完全被windows破坏的c#开发人员。
提前谢谢!关于这方面的建议..。
发布于 2009-12-29 21:55:04
mint发行版基于Ubuntu/Debian,因此我假设我的Ubuntu方法也适用于mint。
First
您需要一些工具、库和标题:
# install the standard toolchain (g++, make, etc.)
sudo aptitude install build-essential
# install the build dependencies for a desktop based networking tool
sudo aptitude build-dep gnome-nettool
可选
因为您提到了系统监视器--从源构建gnome系统监视器可能会有帮助:
# install the build dependencies for gnome-system-monitor
sudo aptitude build-dep gnome-system-monitor
# get the sources for the gnome-system-monitor
mkdir example
cd example
apt-get source gnome-system-monitor
# build the gnome-system-monitor
# note: you might have a different version. But I'm sure you get the idea ;-)
cd gnome-system-monitor-2.28.0
sh configure
make
终于
你需要一些东西来开发和调试。许多unix开发人员推荐emacs或vi(m)。但我个人的观点是,您应该从基于“现代”GUI的IDE开始。
下面是一些常用IDE的集合:
另见:关于SOF关于“最佳”Linux C++的讨论
发布于 2009-12-29 20:57:00
人们通常使用(g)Vim或emacs之类的文本编辑器来编写C++应用程序。如果你从来没见过他们,他们可能有点压倒性。你也可以使用IDEs如Geany,Anjuta,QtCreator,Eclipse.
我认为Mint中的默认桌面环境是侏儒,它使用GTK库。您可以在应用程序中使用GTK。它是用C编写的,但是它有一个c++接口,吉克姆,以及项目站点上的教程。
还有Qt,它是K桌面环境或KDE的基础。它是一个非常大的库,其中有一个非常好的IDE,用于它,QtCreator。
最后,您应该搜索堆栈溢出,因为您的大部分问题已经回答了。
发布于 2009-12-29 21:17:01
在回答“我需要什么工具”时,您应该至少安装g++
,这是GNU/Linux系统上的标准C++编译器。
Linux基于Ubuntu (这反过来基于Debian),因此对于gnome-system-monitor
这样的二进制文件,命令
apt-get source $(dpkg -S $(which gnome-system-monitor) | cut -d: -f1)
将下载并解压当前目录中的源代码包。注意,它可能取决于多个库,这些库可以在不同的包中找到。您可以看到apt-cache show package_name
的这些特性,库通常都有使用-dev
命名的相关开发包,这些包包含关联的标头和静态链接的归档。通过使用apt-cache search foo
搜索可以找到dev包名,其中foo是您感兴趣的库包的基本名称。
https://stackoverflow.com/questions/1976719
复制相似问题