No repositório ftp://ftp.ime.usp.br/pub/jstern/mac115/lcc encontra-se um compilador C. Esse compilador pode ser copiado e distribuído mediante as condições descritas no arquivo COPYRIGHT daquele diretório. A Home-Page oficial deste compilador está em http://www.cs.princeton.edu/software/lcc/index.html
Para instalar o compilador lcc em seu micro, execute os seguintes passos:
O arquivo LCCWIN32.DOC.ZIP contém a documentação do compilador. Para descompactá-lo, entre no diretório c:\lccpub e digite
pkunzip -d lccwin~1.zip
Você poderá incluir manualmente os atalhos do compilador e dos helps em sua barra de tarefas:
Uma vez instalado o compilador LCC em seu micro, você poderá utilizá-lo para editar e compilar os programas em C descritos no curso.
Para informações mais detalhadas da operação deste programa, consulte a documentação e os helps. Nesta seção faremos uma breve descrição de como compilar os programas do curso.
Para familiarizar-se com o ambiente do LCC copie o programa-exemplo hello.c para um diretório de seu micro (por exemplo, c:\mac115\hello) e em seguida execute o Wedit.exe.
Para abrir o programa, voce deverá criar um projeto (opção "Create Project" do menu "File"). Especifique o nome do projeto (por exemplo, hello) e seu diretório (c:\mac115\hello). Clique no botão Create.
Em seguida será apresentada uma janela para a inclusão de arquivos no projeto. Na caixa "List Files of Type" selecione "C Sources" e clique duas vezes sobre o arquivo "hello.c" na lista de arquivos. Note que este arquivo deverá constar na lista "Selected project files".
Clique no botão "Validate" para finalizar a criação de seu projeto. O código-fonte do programa hello.c será apresentado num editor. O LCC criará o diretório c:\mac115\hello\lcc, onde serão gravados alguns arquivos auxiliares.
Clique agora no menu "Compiler", na opção "Make". Neste momento o LCC compilará o programa e (se não houver erros) gerará o código executável hipo.exe, que será gravado no diretório c:\mac115\hello\lcc.
Uma janela indicará que o programa foi compilado com sucesso. Clique no botão "Run" para executá-lo. Será aberta uma janela DOS com a apresentação da mensagem do programa. Eventualmente, após a execução do programa, devem aparecer mensagens do tipo "Batch File Missing" ou "File not Found". Não descobri ao certo a causa dessas mensagens, mas não merecem grandes preocupações, já que aparecem somente após o programa ter sido executado. Você pode também executar o programa hello.exe diretamente no prompt do DOS, basta dirigir-se ao diretório onde o mesmo foi gravado.
Nesta seção apresentarei algumas dicas para evitar e contornar pequenos "problemas" que o usuário poderá encontrar.
Scilab version 2.3.1 beta for Windows NT/95
**************************************
16 July 1997
******************************************************************************
INSTRUCTIONS FOR INSTALLING THE BINARY VERSION FOR WINDOWS NT/95
******************************************************************************
0 - Get the files "scilab231.exe" and "cygwin/usertools.exe"
("usertools.exe" comes from the Cygwin distribution:
"ftp://ftp.cygnus.com/pub/gnu-win32/latest").
1 - Put the self extracting archive "scilab231.exe" at the root of your
disk (usually C:) and execute it. This will create the "C:\scilab-2.3"
directory which contains the whole distribution.
2 - Execute "usertools.exe". This will create the "C:\gnuwin32" directory
and install the user tools of Cygwin gnu-win32.
3 - Add "C:\gnuwin32\b18\H-i386-cygwin32\bin" to your PATH.
For instance you can add the following line in
your "C:\autoexec.bat" file:
SET PATH=%PATH%;C:\gnuwin32\b18\H-i386-cygwin32\bin
4 - Create a "C:\bin" directory if it does not already exist
and put a copy of "C:\gnuwin32\b18\H-i386-cygwin32\bin\sh.exe" there.
^M^M
Create a "C:\tmp" directory if it does not already exist. 4bis - **** NT WARNING **** NT WARNING **** NT WARNING ****
For Windows NT, you have to copy the file
"winspool.drv" to directory "C:\scilab-2.3\bin" and change its name to
"winspool.dll".
For NT 4.0, you will find "winspool.drv" in "C:\WINNT\system32\"
For NT 3.xx, you will find "winspool.drv" in "C:\WINDOWS\system32\"
5 - Reboot your computer.
6 - Run Scilab by clicking on "runscilab.exe" in "C:\scilab-2.3\bin".
You can, of course, add a link to runscilab.exe in your start-up menu.
7 - Read the "C:\scilab-2.3\README" file, and the copyright notice in it.
REMARKS: 1 You can also read the "Readme.txt" file in the "cygwin"
directory for more information about GNU Win 32.
In particular, in this file is explained how to install the
full cygwin release with the file cdk.exe (cdk.exe brings
much more functionalities than usertools.exe, gcc compiler
for example, but is much bigger. If you just want to run
Scilab binary version, usertools.exe is enough
2 If you want to install Scilab in another directory than
the standard "C:\scilab-2.3" directory, do the following:
- If you have only installed usertools.exe, edit the
following ascii files: "bin/scilab", "bin/Blatexpr",
"bin/Blatexpr2", "bin/Blatexprs", "bin/Blpr" and
"bin/BEpsf"and replace the string "/scilab-2.3" by the name
of the directory in which you have installed Scilab.
- If you have installed "cdk.exe" then, simply do "make",
in a shell window in Scilab directory.
3 By installing Cygwin at step 2, you have UNIX utilities, in
particular, you are provided with a sh (bash) shell.
So, if you are in a MSDOS window, you can first run sh
in "C:\scilab-2.3\bin" and then run Scilab by executing
"./scilab" (a shell script).
4 It is also a good idea to use Xmouse (a utility program
provided by Microsoft for Windows 95 with Powertoys) when you
use Scilab. When you use Xmouse the focus policy changes: the
active window is the window wherein the mouse is. You can then
type Scilab commands and have a Scilab graphics window above
the standard Scilab window.
You can find a copy of Xmouse.exe in the directory src-required
(xmouse.zip, tools.zip).