Forums

Cobra 0.9.6

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: Cobra 0.9.6

Postby thriwkin » Wed Jan 01, 2014 5:48 am

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
    ...
thriwkin
 
Posts: 26

Re: Cobra 0.9.6

Postby Charles » Wed Jan 01, 2014 10:22 pm

Thanks for the tip thriwkin.

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

HowToInstallFromSource
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Cobra 0.9.6

Postby kobi7 » Wed Jan 01, 2014 10:36 pm

Thanks thriwkin, that was it!
I removed the default namespace. (I wasn't even aware that it was added)
the code works now :-)
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
kobi7
 
Posts: 82
Location: Israel

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 39 guests