Solved

I've got my GNUstep shell working with windows xp and can compile with shell, but how can I compile with a batch file?

Posted on 2010-08-14
6
1,876 Views
Last Modified: 2013-12-13
I've got my GNUstep shell working with windows xp and can compile with shell, but how can I compile with a batch file?

This is the command line which works within the shell.

gcc `gnustep-config --objc-flags` -L /GNUstep/System/Library/Libraries test.m -o test.exe -lgnustep-base -lobjc

However, if I put this in a batch file I get...

--- batch file ---
C:\GNUstep\mingw\bin\gcc `gnustep-config --objc-flags` -L /GNUstep/System/Library/Libraries test.m -o test.exe -lgnustep-base -lobjc

pause
--- batch file ---

Heres the errors...

C:\My Documents\ObjC>C:\GNUstep\mingw\bin\gcc 'gnustep-config --objc-flags' -L /GNUstep/System/Library/Libraries test.m -o test.exe -lgnustep-base -lobjc
gcc: 'gnustep-config: No such file or directory
cc1obj.exe: error: unrecognized command line option "-fobjc-flags'"

C:\My Documents\ObjC>pause
Press any key to continue . . .
0
Comment
Question by:mindwarpltd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 500 total points
ID: 33437712
I attached the script. It should be placed in a file in the current folder, for example, two.sh. Then, in GNUStep shell you type:
$ two.sh
You will get test.exe, to launch it:
$ test.exe
 

#!/bin/bash
gcc `gnustep-config --objc-flags` -L /GNUstep/System/Library/Libraries test.m -o test.exe -lgnustep-base -lobjc

Open in new window

0
 

Author Comment

by:mindwarpltd
ID: 33437731
I'm not having much look, hmmm

Administrator@IRON /c/My Documents/ObjC
$ make.sh
sh: make.sh: command not found

Administrator@IRON /c/My Documents/ObjC
$ ls
fraction.d  fraction.m  hello.exe  hello.m  make.bat  make.sh  test.d  test.exe  test.m  test1.d  test1.exe  test1.m  test2.m
0
 

Author Comment

by:mindwarpltd
ID: 33437732
*luck
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33437788
The file should be exactly as I posted: with #!/bin/bash in the first line.
Sorry, I will not make this thread as long as we used to have. My first comment is an answer. You are welcome to ask related questions about the bash script. We have on EE a special zone for it.
0
 

Author Comment

by:mindwarpltd
ID: 33437812
Just to confirm, that make.sh is in the right folder, re ls ?
0
 

Author Closing Comment

by:mindwarpltd
ID: 33437852
Needed to add sh in front

Administrator@IRON /c/My Documents/ObjC
$ sh make.sh
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Simple Linear Regression

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question