Forums

-ert:no compile fail - is this expected behaviour

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

-ert:no compile fail - is this expected behaviour

Postby hopscc » Fri Feb 22, 2008 1:48 am

Apologies if this is a stupid question _ I'm not a Windows/.net user

if I specify -ert:no i get a *compilation* error with or without -c

C:\home\hops\src\cobra>cobra -ert:no hello.cobra
error: Metadata file "Cobra.Lang.dll" could not be found
Compilation failed - 1 error, 0 warnings

IF I specify both -ert:no ( No runtime embedded ) and -r:Cobra.Lang ( to tell it it needs the runtime) I get a Cobra internal error
C:\home\hops\src\cobra>cobra -c -ert:no -r:Cobra.Lang hello.cobra
error: COBRA INTERNAL ERROR / ArgumentException / An item with the same key has
already been added.
Compilation failed - 1 error, 0 warnings
[ please tell me the key you're complaining about]

I'm doing this to get some idea of generated code size without the embedded runtime....

given the above whats the point of having -ert:no??
I half pie expected it might fail to run the executable without the embeded runtime but I didnt expect it would also fail the compile...
Is this expected/desired behaviour??
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: -ert:no compile fail - is this expected behaviour

Postby Charles » Fri Feb 22, 2008 11:49 am

No, it's not a stupid question. Cobra.Lang.dll should be properly versioned and put in the .NET Global Assembly Cache (GAC), but it's not yet.

Try copying Cobra.Lang.dll into your directory and then do "cobra -ert:no hello" again. Let me know how it goes.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: -ert:no compile fail - is this expected behaviour

Postby hopscc » Fri Feb 22, 2008 9:40 pm

OK. copying Cobra.lang.dll to the cwd and compile+run with ert:no then works.
built exe is smaller by about 80k as advertised.

You might want to add a note to the help emitted by the compiler for the ert option to that end until
the GAC updating is sorted out
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand


Return to Discussion

Who is online

Users browsing this forum: No registered users and 114 guests

cron