Fundamentals > Fundamentals > Relations and Parameters > Relations > C Programs and Relations > Example: To Link an Interactive C Program
Example: To Link an Interactive C Program
After you edit a C program, you must compile and link it. You need a compilation environment to build the program. Consider the following information for compiling a program:
On Windows—You must define two environment variables:
—From the Creo installation location, open the parametric.psf file and add the NT_COMPILER environment variable. The value of this compiler must be 32-bit incremental C compiler command. For example, you can set this environment variable using the visual studio batch file: ENV=NT_COMPILER=<install_location>\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat <arch> & cl.
—The value of the compiler must be the directory path from the load point of the compiler to its libraries (.LIB files)
1. Click Tools > Relations. The Relations dialog box opens.
2. Click Utilities > User Prog > Link. The system starts compiling the program. If the system detects errors, it prints error messages in the startup window. If necessary, edit and relink the program.