Page 2 of 2

Re: Cobra 0.9.6

PostPosted: Wed Jan 01, 2014 5:48 am
by thriwkin
At Charles:

The example works if you compile it by this:
$ cobra x-flags

But if you compile it by this
$ cobra -namespace:Foo x-flags
it causes: 'error: cannot find "Flags". '


At kobi7:
Maybe you made the code "enum Options ..." with this add-in (MonoDevelop.CobraBinding.0.5.1):
http://cobra-language.com/forums/viewtopic.php?f=4&t=17215

If you create a new Project with this add-in, for example "Foo", then the "Project Options -Foo" are initialized with "Default Namespace: Foo".

When you "Build" this project, the add-in calls the Cobra compiler with the compiler command line argument
- "-namespace:Foo"
... and that causes the error message.

If this is the case, then you have two options:
Either
- Delete the "Default Namespace" in the "Project Options - Foo" dialog
(Then the addin calls the Cobra compiler without the "-namespace:..." argument)
Or
- say "System.Flags" instead of "Flags":
Code: Select all
enum Options
    has System.Flags
    ...

Re: Cobra 0.9.6

PostPosted: Wed Jan 01, 2014 10:22 pm
by Charles
Thanks for the tip thriwkin.

This is now fixed with test case, in the repository.

HowToInstallFromSource

Re: Cobra 0.9.6

PostPosted: Wed Jan 01, 2014 10:36 pm
by kobi7
Thanks thriwkin, that was it!
I removed the default namespace. (I wasn't even aware that it was added)
the code works now :-)