You are not logged in.
I have installed gnustep-base and gnustep-gui from the Arch repo's and am attempting to try and compile some basic Obj-C code, although I am running into errors.
First of all, I am following this tutorial http://www.techotopia.com/index.php/Ins … C_on_Linux
Here are the commands that I am using and their output in the terminal.
[devin@devin-linux Objc]$ gcc 'gnustep-config --objc-flags' -lgnustep-base hello.m -o hello
gcc: error: gnustep-config --objc-flags: No such file or directory
[devin@devin-linux Objc]$ gnustep-config --objc-flags
-MMD -MP -D_FORTIFY_SOURCE=2 -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fgnu-runtime -fconstant-string-class=NSConstantString -fexec-charset=UTF-8 -I. -I/home/devin/GNUstep/Library/Headers -I/usr/include -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -I/usr/include -I/usr/lib/libffi-3.0.13/include/ -I/usr/lib/libffi-3.0.13/include -I/usr/include/libxml2 -I/usr/include/p11-kit-1
[devin@devin-linux Objc]$ Also, here is the code that I am attempting to execute.
#include <Foundation/Foundation.h>
int main(int argc, const char* argv[]) {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Hello world");
[pool drain];
return 0;
}Last edited by ProtoTech (2014-06-07 00:04:42)
Offline
In
gcc 'gnustep-config --objc-flags' -lgnustep-base hello.m -o hellothe ' have to be replaced by backtics `
gcc `gnustep-config --objc-flags` -lgnustep-base hello.m -o helloOffline
In
gcc 'gnustep-config --objc-flags' -lgnustep-base hello.m -o hellothe ' have to be replaced by backtics `
gcc `gnustep-config --objc-flags` -lgnustep-base hello.m -o hello
Ah, thank you. This is where copying and pasting catches up to you.
Offline