1. Translator to C
- Posted by han45 Nov 13, 2014
- 1506 views
- Last edited Nov 20, 2014
Hello Programmers ,
a tried to translate the demo program "key.ex"
into C Code.
I have Watson and MinGW installed.
Therfore i tried first. euc -wat key.ex
And then euc -gcc key.ex
But there are error messages. It dont function.
In the building packages is only one file : init.err
I have made a screenshot of the CMD Window.
Have anybody an idea what i have made false ?
Greetings
Hans
SHOTS :
Here is the CMD Shot :
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
J:\Assistant\042.Programmieren\Editoren\cedt-241-portable>C:
C:\>cd euphoria
C:\Euphoria>cd demo
WITH WATCOM :
C:\Euphoria\demo>euc -wat key.ex
Build directory: build-946960\
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11 generating
Compiling with Watcom
Compiling 1% init-.c
c:\Euphoria\include/euphoria.h(12): Error! E1055: Unable to open 'stdio.h'
c:\Euphoria\include/euphoria.h(254): Error! E1022: Missing or misspelled data ty
pe near 'FILE'
c:\Euphoria\include/euphoria.h(256): Error! E1022: Missing or misspelled data ty
pe near 'FILE'
Couldn't compile file 'init-.c'
Status: 8 Command: wcc386 /dEWINDOWS /bt=nt /mf /w0 /zq /j /zp4 /fp5 /fpi87 /5r
/otimra /s /Ic:\Euphoria init-.c
Could not remove directory build-946960\
Warning { translator }:
<0216>:: Watcom should have the H and the H\NT includes at the front of the
INCLUDE variable. Watcom is located in C:\WATCOM. The INCLUDE environment vari
able is C:\Dokumente und Einstellungen\Hans Schüren\Desktop\TEST\xblite_241\xbli
te\include.
WITH GCC :
C:\Euphoria\demo>euc -gcc key.ex
Build directory: build-274283\
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11 generating
Compiling with GCC
Compiling 1% init-.c
Couldn't compile file 'init-.c'
Status: -1 Command: gcc -DEWINDOWS -fomit-frame-pointer -c -w -fsigned-char -O2
-m32 -Ic:/Euphoria -ffast-math init-.c
C:\Euphoria\demo>
Vielen Dank Andreas ,
sicherlich spreche ich deutsch. Hallo.
Ich habe zunaechst einmal Watcom "ueberinstalliert"
Probiere es heute nachmittag noch mal aus.
Im Forum ist wohl auch an "ganz schlauer Vogel". Bei meiner geposteten Frage zum "Full Screen Output" meinte dieser doch dass ich noch zu einem Englischkurs gehen soll. Ich habe besseres zu tun weil ich auch noch arabisch lerne. ( Schreiben , lesen , sprechen.) Zudem habe ich internationale Diplome in englisch.
Zu dem Thema schreibe ich dem gleich was. Das wird lustig.
Als Anfaenger bin ich gerade bei dem Thema "File and Device Handling" in dem Buch "a beginners guide to euphoria" von David Gay.
Nochmals vielen Dank fuer die Tipps. Die funktionieren alle.
Gruss Hans
2. Re: Translator to C
- Posted by andi49 Nov 15, 2014
- 1384 views
Hallo Hans
[...]
Here is the CMD Shot :
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. J:\Assistant\042.Programmieren\Editoren\cedt-241-portable>C: C:\>cd euphoria C:\Euphoria>cd demo WITH WATCOM : C:\Euphoria\demo>euc -wat key.ex Build directory: build-946960\ Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11 generating Compiling with Watcom Compiling 1% init-.c c:\Euphoria\include/euphoria.h(12): Error! E1055: Unable to open 'stdio.h' [...] Warning { translator }: <0216>:: Watcom should have the H and the H\NT includes at the front of the INCLUDE variable. Watcom is located in C:\WATCOM. The INCLUDE environment vari able is C:\Dokumente und Einstellungen\Hans Schüren\Desktop\TEST\xblite_241\xbli te\include.
Looks like you have messed up your Enviroment Variables, maybe you have installed xblite after OpenWatcom.
For a quick solution: In your Watcom directory (normally c:\watcom) should be a 'owsetenv.bat'. Start this before calling the translator. Maybe this helps.
Should look like this:
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\> C:\>c:\watcom\owsetenv.bat C:\>cd euphoria C:\Euphoria>cd demo C:\Euphoria\demo>euc -wat key.ex
Andreas
Sprechen Sie Deutsch? ;)