[TxMt] Re: Compile small objc project (.h, .m and main)

Panagiotis Atmatzidis atma at convalesco.org
Sat Apr 4 18:58:06 UTC 2009


Hello again,

I've wrote a small bundle to do what I'd like but I'm missing something:

----
#!/usr/bin/sh  - atma 05/11/2006
BASE=${TM_FILEPATH%.m}
DIR=${TM_DIRECTORY}

gcc  -o "$TM_FILEPATH" $DIR/main.m "$BASE" -l objc

# Simple bash check out and compile

if [[ -e $BASE ]]
   then
      echo “Executing $BASE”
      echo “”
      exec $BASE
else
      echo “”
      echo “File does not exist”
fi

----

Apparently the program cannot find "main.m" file. Can anyone see any  
obvious errors to this amateur bundle?

regards

On 31 Μαρ 2009, at 6:40 ΜΜ, Panagiotis Atmatzidis wrote:

> Greetings to everyone,
>
> How is it possible to compile a small program via short-cut. Until now
> I've used apple-cmd+R (RUN/Compile via xCode) in my .m files
> (objective-c). Via command usually I do something like this:
>
> Angel:Fraction atma$ ls
> Fraction.h      Fraction.m      main.m
> Angel:Fraction atma$ gcc Fraction.m main.m -o Fraction -l objc
> Angel:Fraction atma$ ./Fraction
>  5 / 10 = 0.5
>  0 / 0 = 0
> Angel:Fraction atma$
>
> Best regards & thanks in advance
>
>
> Panagiotis (atma) Atmatzidis
>
> email:	atma at convalesco.org
> URL:	http://www.convalesco.org
> --
> The wise man said: "Never argue with an idiot. They bring you down to
> their level and beat you with experience."
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate

Panagiotis (atma) Atmatzidis

email:	atma at convalesco.org
URL:	http://www.convalesco.org
--
The wise man said: "Never argue with an idiot. They bring you down to  
their level and beat you with experience."




More information about the textmate mailing list