1. C has not been declared!
- Posted by Vidi <vidi22 at gmail.com> Apr 04, 2006
- 494 views
- Last edited Apr 05, 2006
Hi, I am trying to make a small program to dispalay an image onto the screen, but when I run it, it doesn't show the image and the ERR file says: C:\euphoria\BIN\Stuff\ex.err:1 C has not been declared C:\euphoria\BIN\Stuff\ex.err:1 ^ my code is:
include graphics.e include image.e atom gm sequence graphic1 gm = graphics_mode(18) clear_screen() graphic1 = read_bitmap("1.bmp") display_image({40,20},{graphic1[2]})
Any ideas why it doesn't work?
2. Re: C has not been declared!
- Posted by Juergen Luethje <j.lue at gmx.de> Apr 04, 2006
- 467 views
- Last edited Apr 05, 2006
Vidi wrote: > I am trying to make a small program to dispalay an image onto the screen, but > when I run it, it doesn't show the image and the ERR file says: > > C:\euphoria\BIN\Stuff\ex.err:1 > C has not been declared > C:\euphoria\BIN\Stuff\ex.err:1 > ^ > my code is: > }}} <eucode> > include graphics.e > include image.e > > atom gm > sequence graphic1 > > gm = graphics_mode(18) > clear_screen() > graphic1 = read_bitmap("1.bmp") > display_image({40,20},{graphic1[2]}) > </eucode> {{{ > > Any ideas why it doesn't work? I have no idea how this code can produce that error message! However, display_image({40,20}, graphic1[2]) should work. Regards, Juergen
3. Re: C has not been declared!
- Posted by Jason Gade <jaygade at yahoo.com> Apr 04, 2006
- 480 views
- Last edited Apr 05, 2006
Juergen Luethje wrote: > > Vidi wrote: > > > I am trying to make a small program to dispalay an image onto the screen, > > but > > when I run it, it doesn't show the image and the ERR file says: > > > > C:\euphoria\BIN\Stuff\ex.err:1 > > C has not been declared > > C:\euphoria\BIN\Stuff\ex.err:1 > > ^ > > my code is: > > }}} <eucode> > > include graphics.e > > include image.e > > > > atom gm > > sequence graphic1 > > > > gm = graphics_mode(18) > > clear_screen() > > graphic1 = read_bitmap("1.bmp") > > display_image({40,20},{graphic1[2]}) > > </eucode> {{{ > > > > Any ideas why it doesn't work? > > I have no idea how this code can produce that error message! > However, > display_image({40,20}, graphic1[2]) > should work. > > Regards, > Juergen My guess is somehow you are trying to execute the ex.err file instead of your program? Looking at the output it looks like ex.err is somehow trying to read itself. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.
4. Re: C has not been declared!
- Posted by "Greg Haberek" <ghaberek at gmail.com> Apr 05, 2006
- 492 views
> Any ideas why it doesn't work? Are you using ed? It looks like you're trying to execute the ex.err file. Close the ex.err file by hitting Esc-Q, then hit Esc-E to run your app. This is probably a case of mistaken window. ~Greg
5. Re: C has not been declared!
- Posted by Vidi <vidi22 at gmail.com> Apr 05, 2006
- 476 views
Hi again, the error output should be: C:\euphoria\BIN\Stuff\ex.err:1 C has not been declared C:\euphoria\BIN\Stuff\outputs1.ex:17 ^ sorry for the mistake. Anyway line 17 is:
graphic1 = read_bitmap("1.bmp")
maybe I should start with something simpler.
6. Re: C has not been declared!
- Posted by Igor Kachan <kinz at peterlink.ru> Apr 05, 2006
- 508 views
Vidi wrote: > > Hi, > > I am trying to make a small program to dispalay an image onto the screen, but > when I run it, it doesn't show the image and the ERR file says: > > C:\euphoria\BIN\Stuff\ex.err:1 > C has not been declared > C:\euphoria\BIN\Stuff\ex.err:1 > ^ > my code is: > }}} <eucode> > include graphics.e > include image.e > > atom gm > sequence graphic1 > > gm = graphics_mode(18) > clear_screen() > graphic1 = read_bitmap("1.bmp") > display_image({40,20},{graphic1[2]}) > </eucode> {{{ > > Any ideas why it doesn't work? Hi Vidi, Your code works fine for me, if I change this line:
display_image({40,20},graphic1[2]) -- see just graphic1[2] without {}
But I can not reproduce that trick with err.ex anyway! Regards, Igor Kachan kinz at peterlink.ru
7. Re: C has not been declared!
- Posted by Al Getz <Xaxo at aol.com> Apr 05, 2006
- 501 views
Vidi wrote: > > Hi again, > > the error output should be: > > C:\euphoria\BIN\Stuff\ex.err:1 > C has not been declared > C:\euphoria\BIN\Stuff\outputs1.ex:17 > ^ > > sorry for the mistake. Anyway line 17 is: > }}} <eucode>graphic1 = read_bitmap("1.bmp")</eucode> {{{ > maybe I should start with something simpler. Hi there, I can only guess, but it looks like maybe you wanted to include something like: include C:\euphoria\BIN\Stuff\MyFile.e and instead you typed: C:\euphoria\BIN\Stuff\MyFile.e in which case i think you would get an error saying that 'C' wasnt declared because Eu thinks it's a namespace prefix. Just a guess... See if you have anything like that in one of your files. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
8. Re: C has not been declared!
- Posted by Al Getz <Xaxo at aol.com> Apr 05, 2006
- 472 views
Al Getz wrote: > > Vidi wrote: > > > > Hi again, > > > > the error output should be: > > > > C:\euphoria\BIN\Stuff\ex.err:1 > > C has not been declared > > C:\euphoria\BIN\Stuff\outputs1.ex:17 > > ^ > > > > sorry for the mistake. Anyway line 17 is: > > }}} <eucode>graphic1 = read_bitmap("1.bmp")</eucode> {{{ > > maybe I should start with something simpler. > > Hi there, > > > I can only guess, but it looks like maybe you wanted to include something > like: > > include C:\euphoria\BIN\Stuff\MyFile.e > > and instead you typed: > > C:\euphoria\BIN\Stuff\MyFile.e > > in which case i think you would get an error saying that 'C' wasnt > declared because Eu thinks it's a namespace prefix. > > Just a guess... > > See if you have anything like that in one of your files. > > > Al > > > My bumper sticker: "I brake for LED's" > > From "Black Knight": > "I can live with losing the good fight, > but i can not live without fighting it". > "Well on second thought, maybe not." Hi again, Ok, i just verified that that would cause that error message and here's what i got: C:\Euphoria\TestOthers\Other\UnusualError.exw:1 C has not been declared C:\download\MyFile.e ^ The file was "UnusualError.exw" and the only thing in the file was this: -------------------------------------------- C:\download\MyFile.e -------------------------------------------- exactly as shown without any 'include' keyword. You'll have to check your files for any mistake like this. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
9. Re: C has not been declared!
- Posted by Vidi <vidi22 at gmail.com> Apr 05, 2006
- 483 views
Hi again, I got it working!! yay!! But I don't know how I did it :( still thanks for all you help. --Vidi