<!-- kate: tab-width 2; indent-mode xml; -->
<chapter id="faq">
<title>FAQ</title>

<qandaset>
	<qandaentry>
		<question>
			<para>CMake cannot find gpsim</para>
		</question>
		
		<answer>
			<para>CMake will attempt to compile several files to test for gpsim presence; testing for versions 0.21.4, 0.21.11 and 0.26. These files uses part of the gpsim API, that is also used by &ktechlab;, and was introduced in the respective gpsim versions. If it fails in compiling this program, it will display the warning to the user, and PIC simulation support will not be compiled into &ktechlab;. There are a number of possibly reasons for finding gpsim to fail:</para>
			
			<itemizedlist>
				<listitem><para>gpsim >= 0.21.4 is not installed. &ktechlab; does not support gpsim-0.21.2 or gpsim-0.20.14 (or any earlier versions). Later versions may work; but this cannot be tested before they are released. The latest gpsim can be obtained from the <ulink url="http://gpsim.sourceforge.net/gpsim.html">gpsim website</ulink>.</para></listitem>
										<listitem><para>Gpsim is installed, but the header files could not be found. If gpsim is installed in a non-standard location, you may need to specify the location of the header files with <command>cmake</command> <option>-DGPSim_INCLUDE_DIR=<replaceable>DIR</replaceable></option>. It is also likely you'll need to specify a library location with the CMake option <quote>GPSim_LIBRARY</quote> if the libraries are in a non-standard location.</para></listitem>
				<listitem><para>Gpsim is installed and the headers are somewhere where CMake can find them, but there is some other glib craziness occurring.</para></listitem>
			</itemizedlist>
				
			<para>CMake generates the file <filename>CMakeError.log</filename> which will contain details of exactly what went wrong. Searching for gpsim in this log should help you decide what's happened. As an example, here is part of the <filename>CMakeError.log</filename> file where one of the gpsim header files is missing:</para>
			
			<example><title>Possible CMakeError.log output where gpsim detection failed</title>
				<programlisting>
Building CXX object CMakeFiles/cmTryCompileExec4251549203.dir/src.cxx.o
/usr/share/colorgcc/c++ -DHAVE_GPSIM_0_26 -fexceptions -I/usr/lib64/glib-2.0/include -o CMakeFiles/cmTryCompileExec4251549203.dir/src.cxx.o
-c /home/user/playground-devtools/ktechlab/build/CMakeFiles/CMakeTmp/src.cxx
/home/user/playground-devtools/ktechlab/build/CMakeFiles/CMakeTmp/src.cxx:1:33: fatal error: gpsim/pic-processor.h: No such file or directory
 #include &lt;gpsim/pic-processor.h&gt;
                                 ^
compilation terminated.</programlisting>
			</example>
			
			<para>If the <filename>CMakeError.log</filename> does not help, please contact the &ktechlab; developers with the relevant parts of <filename>CMakeError.log</filename> attached.</para>
		</answer>
	</qandaentry>
	
	<qandaentry>
		<question>
			<para>&ktechlab; uses lots of CPU</para>
		</question>
		
		<answer>
				<para>There are several possible causes. Simulation of circuits that contain both reactive and nonlinear components (such as capacitors and transistors) take a lot of CPU time to simulate. You can pause and resume the simulation via the <guimenu>Tools</guimenu> menu.</para>
			
				<para>Drawing of the work area (in particular, redrawing lots of rapidly updating voltage bars on pins) is also CPU intensive. You can reduce the refresh rate or turn off the voltage bars via the <guilabel>Settings</guilabel> dialog. The refresh rate of the <guilabel>Oscilloscope</guilabel> can also be reduced by right clicking on its display.</para>

			<para>Note that the next major release of &ktechlab; can be a lot faster in both displaying the work area and simulating reactive and nonlinear components.</para>
		</answer>
	</qandaentry>
</qandaset>
</chapter>
