Jump to content
Excelsior Forums
Sign in to follow this  
uldonyar

MODULA2 in UBUNTU 8.10 "HELLO WORLD"

Recommended Posts

Hello, Excuse my bad language, my english is very bad.

i tried to install xds modula 2 in ubuntu 8.10. Everything is ok. I have make the "hola.mod" in KATE editor.

Then i put: "xc =c hola.mod", and the screen shows:

XDS Modula-2 v2.40 [x86, v1.50] - build 10.05.2005

Compiling "hola.mod"

no errors, no warnings, lines    9, time  0.00

OK, i suppose, but ?how can i continue to execute my program?

i put: " xc =m hola.mod"

But  the screen shows:

O2/M2 development system v2.51 © 1999-2003 Excelsior, LLC. (build 10.05.2005)

#project is up to date

external command fault 153:

make -f tmp.mkf

i tried : xc =m hola.o  and the result is :

O2/M2 development system v2.51 © 1999-2003 Excelsior, LLC. (build 10.05.2005)

#project is up to date

But i can do anything more: the executable file not exists. ?can you help me, please?

THANKS

Share this post


Link to post
Share on other sites

I don't know about Linux make. Under Windows, you have to set up the

compiler path, C library include and lib paths (e.g. via modified VSVARS32.BAT

VC8 batch) and then execute the tmp.mkf make file manually, via command prompt and nmake. Invocation from XDS IDE or via xc make utility fails similarly to your

failure.

Did you try xm instead of xc ? xc compiles to intermediate C language code.

xm should compile and link to X86 binary executable / machine code directly.

Hope this helps, Siegfried.

P.S. : Here is my modified version of VSVARS32.BAT :

@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8

@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8\VC

@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework

@SET FrameworkVersion=v2.0.50727

@SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0

@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR

@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

@echo Setting environment for using Microsoft Visual Studio 2005 x86 tools.

@rem

@rem Root of Visual Studio IDE installed files.

@rem

@set DevEnvDir=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE

@set PATH=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;%PATH%

@set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;%INCLUDE%

@set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;C:\XDS\LIB\C;%LIB%

@set LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

@goto end

:error_no_VSINSTALLDIR

@echo ERROR: VSINSTALLDIR variable is not set.

@goto end

:error_no_VCINSTALLDIR

@echo ERROR: VCINSTALLDIR variable is not set.

@goto end

:end

I based this on the original VSVARS32.BAT file located in

C:\Program Files\Microsoft Visual Studio 8\Common7\Tools

This also lets you build the C library needed for XDS xc make utility, via

nmake /nologo /f msvc.mkf  command line, run in C:\XDS\LIB\C

Share this post


Link to post
Share on other sites

I also use Ubuntu 8.10 and have no problem.  With my installation, running "xc =m hello.mod" gives me the following.

O2/M2 development system v2.51 (c) 1999-2003 Excelsior, LLC. (build 10.05.2005)
#project is up to date
New "tmp.mkf" is generated using template "/home/johng/opt/xds/bin/xc.tem"
gcc  -o hello hello.o   /home/johng/opt/xds/lib/x86/libxds.a  -lm -lncurses

I have two questions (which may sound silly):

  • Do you have "make" installed and in your path?
  • As indicated by Siegried, have you built the librairies?

Share this post


Link to post
Share on other sites

In the installation instructions i only saw that i have to uncompress the archive in the user folder. Later add path: \home\user\xds\bin and \home\user\xds\lib.

Then type "xcwork" in the work folder. all was OK. I can Compile but icannot MAKE.

THANKS for writing. Sorry, my English is terrible...

Share this post


Link to post
Share on other sites

make usually is a package of its own (not part of gcc as you can use different utilities in the open source world if you wish) in Debian-based distributions. And I think you'll have it installed with Ubuntu (which I never used) - but why not try by typing make in a commandline?

Share this post


Link to post
Share on other sites

Actually, what it looks like to me, is that you originally compiled the program without linking it when you used =compile, you then attempted to recompile it with =make  You got the error the second time because the program was already compiled with the current timestamp, so the compiler figured that there was nothing new. If it were me, I'd say the simplest solution would be to open hola.mod back up in the editor and type a space or something then resave it so that the timestamp changes.  then rerun xc =m hola.mod (or alternately forget the re-edit of the file and just run xc =m =all hola.mod to force a recompile of everything (=all makes it ignore the timestamps)).

Share this post


Link to post
Share on other sites

> I'd say the simplest solution would be to open hola.mod back up in the editor

I would suggest "touch" so that there is no possibility of accidentally changing the file.

Share this post


Link to post
Share on other sites

> I'd say the simplest solution would be to open hola.mod back up in the editor

I would suggest "touch" so that there is no possibility of accidentally changing the file.

True - that's the route I'd take, but I was trying to keep it non-OS specific, even though the OP uses Linux :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×