Problems with Tao-Framework and Cobra
Posted: Thu Mar 13, 2008 3:48 pm
I'm trying to build some short Tao.SDL example but I have quite some problems compiling it..
while trying to compile this:
I got this error ( sdl_INIT_EVERYTHING etc. really exist in Tao.Sdl in other programming languages..) :
so I changed the Program like this :
but of course I got an error since everything is defined in Tao.Sdl and not Tao.Sdl.Sdl ...
What am I doing wrong here ? or is this really a bug ?
while trying to compile this:
use Tao.Sdl
class Program
def main is shared
Sdl.sdl_Init(Sdl.sdl_INIT_EVERYTHING)
surfacePtr = Sdl.sdl_SetVideoMode(640,480,32,(Sdl.sdl_HWSURFACE|Sdl.sdl_DOUBLEBUF|Sdl.sdl_ANYFORMAT))
I got this error ( sdl_INIT_EVERYTHING etc. really exist in Tao.Sdl in other programming languages..) :
- Code: Select all
X:\cobra>cobra.exe -sharp-compiler:"H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc" muh.cobra -r:Tao.Sdl -lib:X:\Programme\Tao\examples
muh.cobra(11): warning: Unnecessary parentheses around expression. You can remove them.
muh.cobra(10): error: Cannot find a definition for "sdl_INIT_EVERYTHING" in "Sdl" whose type is "Sdl". There is a member named "Sdl" with a similar name.
muh.cobra(10): error: Cannot find a definition for "sdl_Init" in "Sdl" whose type is "Sdl". There is a member named "Sdl" with a similar name.
[...]
muh.cobra(11): error: Cannot find a definition for "sdl_SetVideoMode" in "Sdl" whose type is "Sdl". There is a member named "Sdl"
with a similar name.
muh.cobra(11): warning: The value of variable "surfacePtr" is never used.
Compilation failed - 6 errors, 2 warnings
Not running due to errors above.
so I changed the Program like this :
use Tao.Sdl
class Program
def main is shared
Sdl.Sdl.sdl_Init(Sdl.Sdl.sdl_INIT_EVERYTHING)
surfacePtr = Sdl.Sdl.sdl_SetVideoMode(640,480,32,(Sdl.Sdl.sdl_HWSURFACE|Sdl.Sdl.sdl_DOUBLEBUF|Sdl.Sdl.sdl_ANYFORMAT))
but of course I got an error since everything is defined in Tao.Sdl and not Tao.Sdl.Sdl ...
- Code: Select all
X:\cobra>cobra.exe -sharp-compiler:"H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc" muh.cobra -r:Tao.Sdl -lib:X:\Programme\Tao\examples
muh.cobra(9): warning: Unnecessary parentheses around expression. You can remove them.
muh.cobra(9): warning: The value of variable "surfacePtr" is never used.
muh.cobra(8): error: Tao.Sdl.Sdl enthält keine Definition für Sdl.
muh.cobra(9): error: Tao.Sdl.Sdl enthält keine Definition für Sdl.
Compilation failed - 2 errors, 2 warnings
Not running due to errors above.
What am I doing wrong here ? or is this really a bug ?