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

--- 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 . . .
Question by:mindwarpltd
  • 4
  • 2
LVL 33

Accepted Solution

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


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

Open in new window


Author Comment

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

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

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

Author Comment

ID: 33437732
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)

LVL 33

Expert Comment

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.

Author Comment

ID: 33437812
Just to confirm, that is in the right folder, re ls ?

Author Closing Comment

ID: 33437852
Needed to add sh in front

Administrator@IRON /c/My Documents/ObjC
$ sh

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 10 4 36
What is atomic operation? 6 43
Synchronization using condition variables to avoid locking in C 8 57
simplest php form 3 57
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

947 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now