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,866 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
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 …

821 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