Distribute Compiled GAUSS Code

I want to distribute my GAUSS code to other people so that they cannot see my procedures.  How do I do that?  I want to keep them proprietary.

2 Answers



0



What you need to do is distribute your code in a compiled format.  To compile your GAUSS code, please do the following:

1.  Change directories to where your program is located.

2.  Select the Command Tab (on the left side of your screen) for the Command Window

3.  At the Command Prompt that looks like >>  type:
compile filename

4.  This will create a GAUSS Compiled File called:   filename.gcg

5.  If you distribute this file to someone who already has GAUSS, they should be able to run this *.gcg file in a Command Window by typing:
run filename.gcg
6.  If the person you are distributing your program to does NOT have GAUSS, you will need to provide them with a copy of the GAUSS Run-Time Module (GRTM).   The GAUSS Run-Time Module (GRTM) allows users to distribute GAUSS applications that they have written to people who do not have GAUSS. Developers distribute a compiled file to end users along with the GRTM. This is available with GAUSS at no extra charge. Please contact Aptech Systems for more information.



0



ADDITIONAL QUESTION:

My code "main.gss" has a reference to my library of procedures using #include supl.gss. What I need is:

1. provide my code "main.gss" to someone.
2. do not share my codes in "supl.gss", but the person who receives "main.gss" should be able to run it in GAUSS.

I can compile "supl.gcg", but unfortunately, "main.gss" cannot find my procedure in "supl.gcg".   How can "main.gss" find my procedure in "supl.gcg"?

-------------------------------------------------
ANSWER:

The 'use' keyword is the equivalent of #include for .gcg files. Here are the steps you need to take:

1. Compile the file that you want included.
2. AT THE TOP of your main file add the statement:

use ;

I have attached two sample files to give you a concrete example. To run them:

1. Place both files in the same directory.
2. Set your GAUSS working directory to the directory which contains these files.
3. Compile the 'supplement' file with this command:

compile supplement.gss supplement.gcg

4. Run the "main" file named, 'main.gss' as you would any other file.  The 'use' statement will assume the .gcg file exension.

--------------------------------------------------

supplement.gss

min_width = 3;
min_height =  3;

proc (1) = hypotenuse(a, b);
retp(sqrt(a^2 + b^2));
endp;

proc (1) = triangleArea(base, height);
retp(0.5 .* base .* height);
endp;

--------------------------------------------------

main.gss

new;

use supplement;

height = 4;
width = 5;

if height > min_height;
print "triangle area = " triangleArea(width, height);
else;
print "height below minimum";
endif;

Your Answer

2 Answers

0

What you need to do is distribute your code in a compiled format.  To compile your GAUSS code, please do the following:

1.  Change directories to where your program is located.

2.  Select the Command Tab (on the left side of your screen) for the Command Window

3.  At the Command Prompt that looks like >>  type:
compile filename

4.  This will create a GAUSS Compiled File called:   filename.gcg

5.  If you distribute this file to someone who already has GAUSS, they should be able to run this *.gcg file in a Command Window by typing:
run filename.gcg
6.  If the person you are distributing your program to does NOT have GAUSS, you will need to provide them with a copy of the GAUSS Run-Time Module (GRTM).   The GAUSS Run-Time Module (GRTM) allows users to distribute GAUSS applications that they have written to people who do not have GAUSS. Developers distribute a compiled file to end users along with the GRTM. This is available with GAUSS at no extra charge. Please contact Aptech Systems for more information.

0

ADDITIONAL QUESTION:

My code "main.gss" has a reference to my library of procedures using #include supl.gss. What I need is:

1. provide my code "main.gss" to someone.
2. do not share my codes in "supl.gss", but the person who receives "main.gss" should be able to run it in GAUSS.

I can compile "supl.gcg", but unfortunately, "main.gss" cannot find my procedure in "supl.gcg".   How can "main.gss" find my procedure in "supl.gcg"?

-------------------------------------------------
ANSWER:

The 'use' keyword is the equivalent of #include for .gcg files. Here are the steps you need to take:

1. Compile the file that you want included.
2. AT THE TOP of your main file add the statement:

use ;

I have attached two sample files to give you a concrete example. To run them:

1. Place both files in the same directory.
2. Set your GAUSS working directory to the directory which contains these files.
3. Compile the 'supplement' file with this command:

compile supplement.gss supplement.gcg

4. Run the "main" file named, 'main.gss' as you would any other file.  The 'use' statement will assume the .gcg file exension.

--------------------------------------------------

supplement.gss

min_width = 3;
min_height =  3;

proc (1) = hypotenuse(a, b);
retp(sqrt(a^2 + b^2));
endp;

proc (1) = triangleArea(base, height);
retp(0.5 .* base .* height);
endp;

--------------------------------------------------

main.gss

new;

use supplement;

height = 4;
width = 5;

if height > min_height;
print "triangle area = " triangleArea(width, height);
else;
print "height below minimum";
endif;


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.