Forums

Embed run-time fully works now

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

Embed run-time fully works now

Postby Charles » Wed Dec 24, 2008 4:14 am

Cobra has an option to embed its run-time library in the resulting program so that there is no external Cobra.Lang.dll needed. However, there has been a bug for some time, described in ticket:3, in which the "Cobra.Lang" namespaces would collide from the embedded and non-embedded (or 2 DLLs with embedded). Now fixed.

To try this feature, say:

cobra -ert:yes MyProg.cobra

You'll notice that the .exe gets bigger:

>cobra hello
Hello, world.

>dir hello.exe
12/24/2008 03:09 AM 4,096 hello.exe


>cobra -ert:yes hello
Hello, world.

>dir hello.exe
12/24/2008 03:10 AM 135,168 hello.exe


>cobra -ert:yes -turbo hello
Hello, world.

>dir hello.exe
12/24/2008 03:12 AM 90,112 hello.exe


Try it out and let me know if you have any problems.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Embed run-time fully works now

Postby gauthier » Wed Dec 24, 2008 6:15 am

it seems the install-from-workspace script performs
Code: Select all
run: cobra.exe -ert:no hello


which give
Code: Select all
c:\home\dev\src\dotnet\projects\cobralanguage\Source\hello.cobra(3): error: The name "CobraCore" does not exist in the current context
c:\home\dev\src\dotnet\projects\cobralanguage\Source\hello.cobra(4): error: The name "CobraImp" does not exist in the current context
c:\home\dev\src\dotnet\projects\cobralanguage\Source\hello.cobra(4): error: The name "CobraCore" does not exist in the current context
c:\home\dev\src\dotnet\projects\cobralanguage\Source\hello.cobra(1): error: The name "CobraImp" does not exist in the current context
Compilation failed - 4 errors, 0 warnings
Not running due to errors above.

** ERROR: Exit code from running Source Cobra: 1


manual instructions work as expected
gauthier
 
Posts: 116

Re: Embed run-time fully works now

Postby Charles » Wed Dec 24, 2008 10:48 am

"cobra -bsl" for building the standard library is somehow the culprit. After this command:

copy Cobra.Lang-previous.dll Cobra.Lang.dll

I was able to run "cobra -ert:no hello" again.

Will fix.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Embed run-time fully works now

Postby Charles » Wed Dec 24, 2008 11:08 am

Fixed.

"cobra -bsl" was mangling the Cobra.Lang namespace name which caused all manner of havoc. Easy fix.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron