3 messages in com.perforce.jammingJam and gcc, gxx, NT4| From | Sent On | Attachments |
|---|---|---|
| Cath...@toucan.ie | 11 May 1998 13:36 | |
| Cath...@toucan.ie | 13 May 1998 07:05 | |
| Moore | 13 May 1998 07:59 |
| Subject: | Jam and gcc, gxx, NT4![]() |
|---|---|
| From: | Cath...@toucan.ie (Cath...@toucan.ie) |
| Date: | 05/13/1998 07:05:00 AM |
| List: | com.perforce.jamming |
Hi,
Can anyone help me with the following problem. I am using Jam 2.2.1 and DJGPP's GNU compiler 2.7.2.1 on NT4. When jam generates a call to the gxx or gcc compiler which is greater than 127 characters I get : "The system cannot execute the specified program."
I have no problems when using another cross-compiler. Also when I copy the command generated by jam and paste it into a command prompt it compiles the file.
I made sure that the command buffer of jam.h is big enough: # define MAXLINE 10240
What's really confusing me is that jam can call the cross-compiler without any problems, but not the gcc compiler. But the gcc compiler can accept a command line longer than 127 characters from the command prompt. I suspect that the problem lies in the interaction between jam and gcc.
Can anyone shed some light on this problem?
For anyone that is interested the problem has something to do with programs calling other programs and passing arguments to them in that wonderful operating system called NT. Basically somewhere between Jam calling the GCC compiler and GCC actually being executed only 126 bytes are being passed to GCC.
I changed my jambase file to do the following:
actions C++ { echo $(C++FLAGS) $(DEFINES) -o $(<) -I$(HDRS) $(>) > filename $(C++) @filename }
actions Link { echo $(LINKFLAGS) -o $(<) $(>) $(NEEDLIBS) $(LINKLIBS) > filename $(LINK) @filename }
i.e. echo the command line arguments into filename then call the compiler: $(C++) @filename The compiler will then be called and DOS or NT will read filename and pass the contents of it to the compiler as if it were entered at the command prompt.
It works with JAM version 2.2.1 I remember trying to echo things into file in previous versions and had some trouble. It's a while ago and I can't remember what the exact problem was.
I hope this will help someone in the future.
Regards, Cathal. ====================================================== Cathal Curtis, cat...@toucan.ie Toucan Technology Ltd, Tel: +353 91 519917 IDA Business Park, Fax: +353 91 519901 Dangan, Galway, Ireland. ======================================================




