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,869 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Independent Software Vendors: 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

Suggested Solutions

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

710 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