我是靠谱客的博主 谨慎早晨,最近开发中收集的这篇文章主要介绍linux gnustep,Cent OS Objective-C:GCC+GNUstep 配置,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

第一个错误:

E127 Error

No X11 libraries/headers were found for compiling GNUstep GUI. You may

have X11 installed, but not the developer packages, which are required

for compiling anything that uses X. If you are using Debian, or a similar

packaged system, try looking for help on installing developer or -dev

packages for the X11 system.

是缺少相应的安装包:

http://pkgs.info/ 一个可以查linux安装包的网站。

yum install libXt-devel

然后其他缺少的:

yum install gnutls-devel

yum install libicu-devel

yum install libjpeg libjpeg-devel

安装成功以后的提示:

Now run the GNUstep initialization script (put this in your

.bashrc or other type of startup script). Note the '.' at the

beginning of the line.

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh

Now you can install some applications and start using GNUstep

Look for a few applications in the AppSources directory. The

typical way to install an application is:

tar -zxf MyApplication.tar.gz

cd MyApplication

make

make install (as root, unless GNUstep is in your home dir)

Then start the application:

openapp MyApplication.app

但是编译的时候一直不对,折腾了好久才发现第一篇安装说明里的路径错误了。

因该是:

gcc gnustep-config --objc-flags -L/usr/GNUstep/System/Library/Libraries -lgnustep-base hello.m -o hello

也可能是版本不同导致的。

我安装的最新的0.30

下面这个命令也可以编译成功的。

gcc -o helloworld helloworld.m -I/GNUstep/System/Library/Headers -fconstant-string-class=NSConstantString -L/GNUstep/System/Library/Libraries -lobjc -lgnustep-base

之前在windows下一直编译不通过应该也是路径错了。

最后

以上就是谨慎早晨为你收集整理的linux gnustep,Cent OS Objective-C:GCC+GNUstep 配置的全部内容,希望文章能够帮你解决linux gnustep,Cent OS Objective-C:GCC+GNUstep 配置所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部