When i changed the lib line it changed to this exception: COBRA INTERNAL ERROR / FormatException / Input string was not in a correct format
I analyzed the code and found that what's causing the exception is this line : 'canvas.clear(ColorU.CornflowerBlue)', wich translates to 'ColorU(100, 149, 237)' internally. So the error seems to be about the color type format. The XNA example uses _graphics.graphicsDevice.clear(Color.cornflowerBlue) , internally it translates to 'Color(0xff6495ed)' , a uint type. I've tried
passing 'ColorU(0xff6495ed)', 'ColorU(100, 149, 237)' and nothing, same error. If i remove 'canvas.clear(ColorU.CornflowerBlue)' it compiles successfully..., but obviously does not run since it depends on the DLL's of the engine...
The result of compiling with -v:
- Code: Select all
C:\Users\Rafael\Desktop>cobra -c -v vortexcobra.cobra
Cobra Command Line 0.8.0 post-release
Copyright (C) 2003-2010 by Cobra Language LLC.
OS Version: Microsoft Windows NT 6.1.7600.0
CLR Platform: .NET
CLR Version: 2.0.50727.4952
Current Directory: C:\Users\Rafael\Desktop
Current Exe: C:\Cobra\Cobra-0.8.0-post\bin\cobra.exe
Option Dictionary:
compile: true
verbosity: 1
back-end: 'none'
contracts: 'inline'
correct-source: Set<of String>['none']
debugging-tips: true
embed-run-time: false
include-asserts: true
include-nil-checks: true
include-tests: true
include-traces: true
native-compiler: 'auto'
number: 'decimal'
test-runner: 'Cobra.Lang.CobraCore.runAllTests'
testify-results: 'r-testify'
Paths:
vortexcobra.cobra
Phase: Binding Cobra run-time library
Adding reference to Cobra.Lang.dll
Phase: Reading libraries
Reading assembly: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b7
7a5c561934e089
at: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
Reading assembly: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a
5c561934e089
at: C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089
\System.dll
Loading reference: Cobra.Lang.dll
Reading assembly: Cobra.Lang, Version=0.8.0.1, Culture=neutral, PublicKeyToken=
0a4783a5c7c9616e
at: C:\Windows\assembly\GAC_MSIL\Cobra.Lang\0.8.0.1__0a4783a5c7c9
616e\Cobra.Lang.dll
Phase: Parsing source code
Setting option "back-end" to default value none.
Setting option "contracts" to default value inline.
Setting option "correct-source" to default value {'none'}.
Setting option "debugging-tips" to default value true.
Setting option "embed-run-time" to default value false.
Setting option "include-asserts" to default value true.
Setting option "include-nil-checks" to default value true.
Setting option "include-tests" to default value true.
Setting option "include-traces" to default value true.
Setting option "native-compiler" to default value auto.
Setting option "number" to default value decimal.
Setting option "test-runner" to default value Cobra.Lang.CobraCore.runAllTests.
Setting option "testify-results" to default value r-testify.
parseToOptions Option Dictionary:
library-directory: List<of String>['E:\Compartilhada\Dev\Vortex2D\Bin\Lib']
back-end: 'none'
contracts: 'inline'
correct-source: Set<of String>['none']
debugging-tips: true
embed-run-time: false
include-asserts: true
include-nil-checks: true
include-tests: true
include-traces: true
native-compiler: 'auto'
number: 'decimal'
test-runner: 'Cobra.Lang.CobraCore.runAllTests'
testify-results: 'r-testify'
preAugment Options Dictionary
compile: true
verbosity: 1
back-end: 'none'
contracts: 'inline'
correct-source: Set<of String>['none']
debugging-tips: true
embed-run-time: false
include-asserts: true
include-nil-checks: true
include-tests: true
include-traces: true
native-compiler: 'auto'
number: 'decimal'
test-runner: 'Cobra.Lang.CobraCore.runAllTests'
testify-results: 'r-testify'
reference: List<of String>['Cobra.Lang.dll']
Adding library-directory "E:\Compartilhada\Dev\Vortex2D\Bin\Lib"
post augmentOptions
compile: true
verbosity: 1
back-end: 'none'
contracts: 'inline'
correct-source: Set<of String>['none']
debugging-tips: true
embed-run-time: false
include-asserts: true
include-nil-checks: true
include-tests: true
include-traces: true
native-compiler: 'auto'
number: 'decimal'
test-runner: 'Cobra.Lang.CobraCore.runAllTests'
testify-results: 'r-testify'
reference: List<of String>['Cobra.Lang.dll']
library-directory: List<of String>['E:\Compartilhada\Dev\Vortex2D\Bin\Lib']
Loading reference: Vortex.dll
Reading assembly: Vortex, Version=0.7.0.0, Culture=neutral, PublicKeyToken=null
at: E:\Compartilhada\Dev\Vortex2D\Bin\Lib\Vortex.dll
Loading reference: Vortex.Core.dll
Reading assembly: Vortex.Core, Version=0.7.0.0, Culture=neutral, PublicKeyToken
=null
at: E:\Compartilhada\Dev\Vortex2D\Bin\Lib\Vortex.Core.dll
Phase: Binding use directives
Phase: Binding inheritance
Phase: Binding interface
Phase: Computing matching base members
Phase: Binding implementation
Reading assembly: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyTo
ken=b03f5f7f11d50a3a
at: C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f
11d50a3a\System.Drawing.dll
error: COBRA INTERNAL ERROR / FormatException / Input string was not in a correct format
Compilation failed - 1 error, 0 warnings