Error Undefined symbol G0025 for procedure that is defined in main file

I have a main program file with a few GAUSS procedures defined at the bottom. The first half, or so, of the file is the main code and it calls some of the procedures at the bottom. It works fine on my other computer, but on my laptop it is giving me the error Undefined symbol G0025.

Here is a basic test case that shows my problem:

x = 5;
print myProc(x);

proc (1) = myProc(x);
   print "you have successfully called myProc";
   retp(x);
endp;

Does anybody know why it won't work on my laptop?

1 Answer



0



accepted

Most likely this is happening, because you have the "Autodelete" preference turned off. This is controlled by a check box in the preferences. For recent versions of GAUSS, it can be found from the main application menu "Tools->Preferences->Compile Options".

If the "Autodelete" preference is turned off, then if GAUSS finds a reference to a procedure that has not yet been defined, GAUSS will ONLY look in:

  1. Your user library, user.lcg.
  2. Any other user specified libraries (i.e. a library that you turn on with the library statement.
  3. The GAUSS library, gauss.lcg.

Note that this search order is only activated for an undefined reference to a procedure. So if you changed your example code snippet above to:

proc (1) = myProc(x);
   print "you have successfully called myProc";
   retp(x);
endp;

x = 5;
print myProc(x);

it would work, because this time when GAUSS gets to the line print myProc(x);, the procedure myProc has already been defined.

aptech

1,773

Your Answer

1 Answer

0
accepted

Most likely this is happening, because you have the "Autodelete" preference turned off. This is controlled by a check box in the preferences. For recent versions of GAUSS, it can be found from the main application menu "Tools->Preferences->Compile Options".

If the "Autodelete" preference is turned off, then if GAUSS finds a reference to a procedure that has not yet been defined, GAUSS will ONLY look in:

  1. Your user library, user.lcg.
  2. Any other user specified libraries (i.e. a library that you turn on with the library statement.
  3. The GAUSS library, gauss.lcg.

Note that this search order is only activated for an undefined reference to a procedure. So if you changed your example code snippet above to:

proc (1) = myProc(x);
   print "you have successfully called myProc";
   retp(x);
endp;

x = 5;
print myProc(x);

it would work, because this time when GAUSS gets to the line print myProc(x);, the procedure myProc has already been defined.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy