compiling from the command line

Upto now I worked with Visual Studio Code but I'm trying now to compile on the command line.

I run

monkeyc -d fenix5plus -f monkey.jungle -o deluxe.prg -y key

and get the following error:

ERROR: monkey.jungle:2: mismatched input '=' expecting {'.', '-', ID, DIGIT, 'manifest', 'sourcePath', 'excludeAnnotations', 'resourcePath', 'lang', 'barrelPath', 'annotations'}

I have the following monkey.jungle:

project.manifest = manifest.xml

project.typecheck = 0

The monkey.jungle and manifest.xml are all in the same directory from where I run the monkeyc - command.

In Visual Studio Code it worked fine. What do I do wrong on the command line?

  • Thanks Jim and FlowState.

    I had another path  in my .bash_profile in which there was an older version of monkeyc. Probably because of the eclipse (or VS Code) setup.

    I had done

    export PATH=$PATH:`cat $HOME/Library/Application\ Support/Garmin/ConnectIQ/current-sdk.cfg`/bin

    as being told in the instructions for setting up the command line mode, but that did not help because running that command still had that older path before the new path in the $PATH. Very nasty.

    Indeed monkeyc - v gave an older sdk version.

    I now changed my .bash_profile in overwriting with abovementioned export command.

    Now it says:

    monkeyc -v

    Connect IQ compiler version 4.1.7

    and monkeyc informs me with the -l option which I need.

    I had nearly resigned and either gone through my whole program adding "as" statements, or gone back to VS Code.

    I like the command mode though, because after eclipse i had to learn again another environment (VS Code). For me the command mode and unix shells are easier and I can go back now to the vi or vim - editor which I used already 40 years ago. (Great: cut and paste only with the mouse: left click/ middle click.)

    Thanks again, I'm curious now whether the compilation will work but I think there is no problem anymore.

  • Glad it’s sorted out now! As a side note, in linux or macOS, you can use the “which” command to investigate this kind of path issue. 
    eg 

    which monkeyc 

    will print the full path to monkeyc (assuming it’s in your shell’s search path). 

    For anyone using windows, “where” is the equivalent cmd:

    stackoverflow.com/.../is-there-an-equivalent-of-which-on-the-windows-command-line