objective-cgccgnustep

gcc: gnustep-config: No such file or directory and unrecognized command line option -fobjc-flags


Hi all please provide me solution for this i want to execute objective using command line

1) command : gcc -o filename 'gnustep-config --objc-flags' 'gnustep-config --base-libs' -o filename.m

error : gcc: gnustep-config: No such file or directory gcc:gnustep-config: No such file or directory cc1obj: error: unrecognized command line option "-fobjc-flags" cc1obj: error: unrecognized command line option "-fbase-libs"

2) command : gcc -o filename 'gnustep-config --objc-flags' -lgnustep-base filename.m

error : gcc: gnustep-config: No such file or directory cc1obj: error: unrecognized command line option "-fobjc-flags"

When i used "-lgnustep-base" one of my error resolved but what about gnustep-config --objc-flags package...

Please provide me solution ......


Solution

  • hey I found the solution !!!!

    just type the command "gnustep-config --objc-flags" in command prompt...

    You will get o/p like : " /-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -D_REENTRANT -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/root/GNUstep/Library/Headers -I/usr/local/include/GNUstep -I/usr/include/GNUstep "

    so now you need to copy all this and placed it to the command prompt like this:

    "gcc -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -D_REENTRANT -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/root/GNUstep/Library/Headers -I/usr/local/include/GNUstep -I/usr/include/GNUstep -o filename -lgnustep-base filename.m "

    type all command without any space.......