Thread View: fras.text.programmieren
1 messages
1 total messages
Started by W. Karwath
Sun, 10 Mar 1996 17:44
GNU-gcc von GoldEd aus ansprechen ?
Author: W. Karwath
Date: Sun, 10 Mar 1996 17:44
Date: Sun, 10 Mar 1996 17:44
87 lines
4019 bytes
4019 bytes
Hallo Leutz,
gestern habe ich mich dazu aufraffen koennen, den GNU C-Compiler in Golded
einzubinden, doch leider ergeben sich maechtige Probleme. Starte ich den
Compiler, so wird nichts compiliert, versuche ich es mit dem MAKE, dann gibt das
Programm lediglich eine 'Bus error'-Fehlermeldung aus, und mein Rechner saeuft
ab. Ich habe schon alles moegliche ausprobiert, Stack hochsetzen, die GNU-Pathes
nochmal im Script setzen etc. Leider hat nichts geholfen. Ich poste hier auch
mal das Skript, es ist nur ein kleiner Anfang, doch solange es nicht laeuft,
lohnt es ja nicht, noch eine Fehlerbehandlung einzubauen. Hier ist es also:
----------------------------------------------------------------------------
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
'QUERY ANYTEXT'
if (result = 'TRUE') then
do
'QUERY DOC VAR OLDNAME' /* remember current file name */
'SAVE ALL NAME="T:TEST.c"' /* create temorary file */
'QUERY PATH'
'DIR NEW ' || RESULT
shell /* address shell */
'gcc -v T:TEST.c ' /* compile */
ok = (RC = 0)
shell /* address host (GoldED)*/
'NAME NEW ' || oldname /* restore old file name */
'QUERY PATH'
'DIR NEW ' || RESULT
if (ok) then do
'REQUEST BODY="GCC done. Run program ?" BUTTON="_Run|_Cancel"'
if (result = 1) then do
'QUERY CON VAR CON'
shell
'T:a.out >' || CON
shell
end
else
'REQUEST BODY="Something went wrong !" BUTTON="_OK"'
end
end
else
'REQUEST BODY="Text buffer is empty ?!"'
/* ---------------------------- END OF YOUR CODE ----------------------- */
'UNLOCK' /* VERY important: unlock GUI */
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
EXIT
-------------------------------------------------------------------------------
Fรผr Hinweise und Tips jeglicher Art waere ich dankbar, ich habe mich zwar schon
zum Groรteil der Anleitung durchgekaempft, aber das hat auch nicht geholfen.
Gruss,
________ ____ ________ _____ ________ ________
_\_ _ \____/ \_\_ _ \/ /_____\__ _ \_\_ __ \
/ / / / / / / / / / /
\____/___/\________/\____/___/\________/\________/\____/___/ eMail
PHANTASM@mamba.hms.mcnet.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads