1. Compiler problem clearer I hope

I tried to clean up my post to make it a little clearer. I wish there was a way you could delete your own post if you see an error right after you first post it.

I'm trying to run Open Watcom from Euphoria with Windows 7 Professional.

•With Windows 7 Premium *
(This code works fine and lasts a long time.)

--------------------------------------compile--------------------------- 
procedure PushButton2_onClick (integer self, integer event, sequence   
  params)--params is {}   
   sequence full,junk,cmd,cmd2   
      move_win()   
      full=getText(EditText4)   
      junk=parse_path(full)   
      cmd="ecw -wat "&junk[2] & junk[1] &"\n"--junk[2]=path junk[1]=file   
 --to be compiled   
      setText(EditText11,cmd)   
      cmd2="move "&bin_path&cut_ext(junk[1])&".exe "&junk[2]&cut_ext(junk[1])&".exe"   
      setCurrentDirectory(bin_path)---"E:\\Euphoria\\bin\\")   
      system(cmd,0)   
      system("emake",0)   
      puts(1,cmd2   &"\n")     
      system(cmd2,0)   
      puts(1,  "Done"  &"\n")   
 end procedure   
setHandler( PushButton2, w32HClick, routine_id("PushButton2_onClick"))   
 

Watcom does it's thing and replies.

35 .c files were created. To build your .exe file. type: emake

I do that, then it says,

compiling with WATCOM
main-0.c
main-1.c
main-2.c
main-3.c
main-4.c
main-5.c
main-6.c
etc...
linking
you now can execute: animal.exe

(this could be any file you browse into EditText4).

  • Now with Windows 7 Professional *

    To start with Window 7 Professional doesn't work with system(), (It does nothing).
    system_exec() does work though. So I use,
      setCurrentDirectory(bin_path)---"E:\\Euphoria\\bin\\")   
      a=system_exec(cmd,0)   
      a=system_exec("emake",0)   
      puts(1,cmd2   &"\n")     
      a=system_exec(cmd2,0)   
      puts(1,  "Done"  &"\n")   

35 .c files were created. To build your .exe file. type: emake

  • Point A *

    At point A, cmd("emake") and cmd2("move...") do nothing.

If I end it at point A the command window has no focus; I can't type in 'emake'.

If I close the main window the command window also closes.

How can I get focus back to the command window?

If type everything in manually at the command prompt (a lot of work) then all works fine.

Therefore it's not an Open Watcom problem it's an Euphoria problem.

Thanks for any help or ideas.

Don Cole

new topic     » topic index » view message » categorize

2. Re: Compiler problem clearer I hope

DonCole said...

I tried to clean up my post to make it a little clearer. I wish there was a way you could delete your own post if you see an error right after you first post it.

Hi Don,

Yeah, just edit it, delete the offending parts, the entire post if necessary, to your liking.

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Compiler problem clearer I hope

DonCole said...
  • Point A *

It is not entirely clear what you mean by that.

DonCole said...

If I end it at point A the command window has no focus; I can't type in 'emake'.

If I close the main window the command window also closes.

How can I get focus back to the command window?

You can't. That command window is "in use" by your application and will not accept user input. You will have to open a second one manually and play "spot the difference" to fix this.

DonCole said...

At point A, cmd("emake") and cmd2("move...") do nothing.

try running "set path" and "where emake" to see what is going on (see below re %COMSPEC%).

DonCole said...

Therefore it's not an Open Watcom problem it's an Euphoria problem.

It sounds more like a windows setup problem to me, and in particular as above I'd question your "path" setup.

DonCole said...

To start with Window 7 Professional doesn't work with system(), (It does nothing). system_exec() does work though. So I use,

As per the docs, system_exec will not run "move...", as that is part of the operating system command interpreter, which system() uses but system_exec() does not. With the latter you can only run .exe or .com files.
You could try running system_exec("%COMSPEC% /C "&cmd), see if that helps.
BTW, I'm running Windows 7 Professional and system() seems fine.

Pete

new topic     » goto parent     » topic index » view message » categorize

4. Re: Compiler problem clearer I hope

Personnally, I have had problems with system or even system_exec with both Seven Home and Seven Pro (64 bits both) and OpenEuphoria 4.

Under Windows, I prefer to execute via pipe:exec (std/pipe.e), shell_execute (win32lib.ew) or wx_execute (wxEuphoria.e).

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu