View Single Post
  #5   Spotlight this post!  
Unread 24-06-2008, 09:11
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 688
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: unknown switch: /z__MPLAB_BUILD=1

I might know even less than Don, and I only have MPLAB 7.20, but hey, I'll take a stab at it. Searching thru the MPLAB Help files, I discovered:

The mcc18.exe compiler uses - command line switches, and mplink uses / command-line switches.

There is also no /z command-line option listed in the help file.

Also, all the switches have a space after the letter. With a space it doesn't recognize the /z at all.

Dropping into the DOS command line (and getting to the correct subdirectory), I tried the /? (list help) command switch. (It was listed in the help file!) No /z listed there, either.

Google has few listings, half which point to this thread and the other half to another thread with a similar problem, but asking about a different error. It did have this tidbit:

/z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1

within the command line. It also uses MPLINK 4.15 (not 3.90). Unfortunately the error was for something else, and didn't get to the /z part at all. But that tidbit might be a clue, that the /z is actually two different switches, /z__MPLAB_BUILD and /z__MPLAB_DEBUG, both which are set to 1.

Quote:
Originally Posted by antiNeo
I don't get this error in MPLAB 7.20
I did get the error, and as a matter of fact, it's the same linker:
Code:
MPLINK 3.90, Linker
Copyright (c) 2004 Microchip Technology Inc.
Error - unknown switch: /z__MPLAB_BUILD=1
Errors    : 1
(I like to check everything, just to be sure. Now added to the list: If Don says sun rises in east, check to be sure! (sorry Don!) )

Okay, my guess: the /z is for the newer linker, not the 3.90 version. Somehow you are using the older linker with the newer MPLAB, or for an even newer MPLAB. Check to make sure you installed everything.

Second guess: The /z tells the linker to be backward compatable with the older MPLAB's building and debugging. New linker, but linking older files.

Conclusion: Either upgrade the Linker or remove the /z. Which is what I was thinking you should have tried (once you knew how) to begin with!

And please, don't forget to tell us what happened!