# Scripts Guide

####
import

- You use this script to generate import libraries so that you can link to the OpenPTC dynamic link libaries.
- This script generates the input libraries "ptc.lib" and "ptcdebug.lib" for your compiler so that you can link to "ptc.dll" and "debug.dll".
- See the Compiler Instructions page for compiler specific instructions on how to generate the import libraries for your compiler.

#### build

- This script is for building an example or demo program, it is capable of building programs with a single source .c or .cpp file, not multiple files.
- To use the build script, simply change to the directory of the example program and execute the script.
- The syntax of the build script is as follows: build name [release|debug] [windows|console]
- The first parameter is manditory, the others are optional.
- The name parameter is the name of the program, ie. you would type "build random" to build the random example (random.cpp to random.exe).
- The second parameter determines what build you want. A release build means that the output is optimized and links to "ptc.dll". A debug build is not optimized, contains debugging information and links to "ptcdebug.dll". If this parameter is omitted then it defaults to release.
- The third parameter selects the type of executable to be output. A windows executable is 'normal'. This means, it just starts with a WinMain and performs all of its output by creating windows. A console application is like a dos application, it runs in a command prompt and pipes stdout there. Do not confuse this a console application and the OpenPTC console, they are not related.
- In most circumstances you will want a windows application, however for some example programs ("Info", "Mode" etc.) that output using printf or cout then you if want to actually see the text output then you have to create a console application.
- Typically, console applications start with "int main()" and windows applications start with "WinMain(...)".