Jump to content
Excelsior Forums
Sign in to follow this  
DavePritchard

No sym file, ? why, Compiles no errors, 2 warnings

Recommended Posts

Hi, 

I have compiled a module Mylib.mod, it compiles with no errors, and 2 warnings, I then tried to compile another module Test.mod

which imports from Mylib,  but get an error "No sym file"

[ CODE     Compile Mylib.mod ]

[dave@localhost xds]$ xc ./p0/src/Mylib.mod
XDS Modula-2 v2.40 [x86, v1.50] - build 10.05.2005
Compiling "./p0/src/Mylib.mod"

* [./p0/src/Mylib.mod 743.11 W903]
* function result is not used
    Ch := $RdKey();

* [./p0/src/Mylib.mod 2430.11 W903]
* function result is not used
    Ch := $RdKey();
no errors, warnings  2, lines 2552, time  0.14

[ END CODE ]

Here I tried to compile Test.mod,   Which imports from Mylib

[ CODE    Compile Test.mod ]

[dave@localhost xds]$ xc ./p0/src/Test.mod
XDS Modula-2 v2.40 [x86, v1.50] - build 10.05.2005
Compiling "./p0/src/Test.mod"

* [./p0/src/Test.mod 25.07 F425]
* file open error: "MyLib.sym" no such file
FROM  $MyLib   IMPORT  GetKey, Colors, RetainColors, RestoreColors,
errors  1, no warnings, lines   25, time  0.00

[ END CODE ]

Both Mylib.def and Test.def compile no problems.  

Are the warnings causing the problem ?   or am I missing something   ?.

[The CODE causing the warnings follows,  + a similar procedure ]

PROCEDURE FlushKeyBoard;
VAR
  Ch : CHAR;

BEGIN
  WHILE KeyPressed() DO
    Ch := RdKey();                               (* Ok so Ch does nothing, but I don't need it to *)
  END;  (* while *)
END FlushKeyBoard;

[ END CODE ]

Any advice as to why there is no sym file ,  and what I need to do to get around this problem

would be most welcome.   Dave P..

One other thing,  as these are library modules, where do I put them after they are compiled, so that I can import them into an application module.?.

Thanks.

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hi Dave,

File "Mylib.sym" is produced when "Mylib.def" is compiled.
Please make sure that "Mylib.sym" has been created.

Sym-files of all imported modules must be available for compiler via "xc.red" file or "lookup" equation.
Try to use the following command line to compile "Test.mod"

xc Test.mod -lookup=*.sym=.;path_to_Mylib.sym

 See section 3.5 "XDS search paths" in User's Guide for more details.

With best regards,
Konstantin

Share this post


Link to post
Share on other sites

Hi  Konstantin ,  Many thanks for the reply,

as an ageing hobby coder, I am on a steep learning curve, and really appreciate the help.

I checked in the xds/sym directory,  Mylib.sys is in there.

[ CODE ]

[dave@localhost xds]$ xc Test.mod -lookup=*.sym=.;path_to_Mylib.sym
XDS Modula-2 v2.40 [x86, v1.50] - build 10.05.2005
Compiling "p0/src/Test.mod"

* [p0/src/Test.mod 25.07 F425]
* file open error: "MyLib.sym" no such file
FROM  $MyLib   IMPORT  GetKey, Colors, RetainColors, RestoreColors,
errors  1, no warnings, lines   25, time  0.01
bash: path_to_Mylib.sym: command not found

[ END CODE ]

So I re-compiled the Mylib.def module;  then re-compiled the Mylib.mod module

then tried compiling the Test.mod module again.

[ CODE ]

Compiling "./p0/def/Mylib.def"
no errors, no warnings, lines  940, time  0.03, new symfile

Compiling "./p0/src/Mylib.mod"
no errors, warnings  2, lines 2552, time  0.10

* [./p0/src/Test.mod 25.07 F425]
* file open error: "MyLib.sym" no such file
FROM  $MyLib   IMPORT  GetKey, Colors, RetainColors, RestoreColors,
errors  1, no warnings, lines   25, time  0.01

[ END CODE ]

The following is the xc.red file,  this is in the xds directory

xc.*   = /usr/local/xds/bin
*.tem  = /usr/local/xds/bin
*.sym  = ./sym;/usr/local/xds/sym/x86
*.a    = .;/usr/local/xds/lib/x86
*.o    = ./obj
*.def  = ./def;./p0/def
*.mod  = ./src;./p0/src
*.ob2  = ./src
*.prj  = .

[ END ]

I believed that the xc.red file did not work, however I have just tried again and all seems OK.

[dave@localhost xds]$ xc Mylib.mod
XDS Modula-2 v2.40 [x86, v1.50] - build 10.05.2005
Compiling "p0/src/Mylib.mod"

Dave P..

 

 

Share this post


Link to post
Share on other sites

Hi Dave,

First of all, you should replace "path_to_Mylib.sym" by the real path to the folder with "Mylib.sym" file.
For example:

xc Test.mod -lookup=*.sym=.;.\sym 

In any case try to run compiler in the make mode (check dependencies and recompile).

xc =m Test.mod

See section 4.2 "XDS compilers operation modes" in User's Guide for more details.

With best regards,
Konstantin

Share this post


Link to post
Share on other sites

Hi Konstantin,  

I think I have sorted this one,  A case of Uppercase in Topspeed  being changed to lower case in XDS.

One uppercase letter got left in the " IMPORT  Mylib " 

Thanks again for the replies,  Sorry for any head scratching over a silly error on my part.

Best Regards  Dave P..

Edited by DavePritchard
Solved

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  

×