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,863 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
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

772 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