<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Slicer3%3AModule_Link_Setup_for_Windows</id>
	<title>Slicer3:Module Link Setup for Windows - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Slicer3%3AModule_Link_Setup_for_Windows"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Slicer3:Module_Link_Setup_for_Windows&amp;action=history"/>
	<updated>2026-05-01T01:18:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Slicer3:Module_Link_Setup_for_Windows&amp;diff=3993&amp;oldid=prev</id>
		<title>Marianna: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Slicer3:Module_Link_Setup_for_Windows&amp;diff=3993&amp;oldid=prev"/>
		<updated>2008-05-15T18:06:25Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:06, 15 May 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Marianna</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Slicer3:Module_Link_Setup_for_Windows&amp;diff=3992&amp;oldid=prev</id>
		<title>Andreas: /* I still get linker errors */</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Slicer3:Module_Link_Setup_for_Windows&amp;diff=3992&amp;oldid=prev"/>
		<updated>2007-09-20T12:58:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;I still get linker errors&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When making a new library or module for Slicer3 you need to carefully set things up so for building.  Best thing to do is copy an existing directory that does something similar to what you have in mind and then change things to match your module setup.&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LibraryName is the first argument to ADD_LIBRARY in CMakeLists for your directory.&lt;br /&gt;
&lt;br /&gt;
LIRBARYNAME is the argument to PROJECT() at the top of the CMakeLists&lt;br /&gt;
&lt;br /&gt;
== Files to Change/Create ==&lt;br /&gt;
&lt;br /&gt;
vtkLibraryNameConfigure.h.in -- just copy and rename an example one.&lt;br /&gt;
&lt;br /&gt;
vtkLibraryName.h -- copy and rename example one and have it include vtkLibraryNameWin32Header.h (note that this .h file will be in your build directory and is made from the .h.in file above).&lt;br /&gt;
&lt;br /&gt;
vtkLibraryNameWin32Header.h -- make the following changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef __vtkLibraryNameWin32Header_h&lt;br /&gt;
#define __vtkLibraryNameWin32Header_h&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;vtkLibraryNameConfigure.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#if defined(WIN32) &amp;amp;&amp;amp; !defined(VTKSLICER_STATIC)&lt;br /&gt;
#if defined(LibraryName_EXPORTS)&lt;br /&gt;
#define VTK_LIBRARYNAME_EXPORT __declspec( dllexport ) &lt;br /&gt;
#else&lt;br /&gt;
#define VTK_LIBRARYNAME_EXPORT __declspec( dllimport ) &lt;br /&gt;
#endif&lt;br /&gt;
#else&lt;br /&gt;
#define VTK_LIBRARYNAME_EXPORT &lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== In your code ==&lt;br /&gt;
&lt;br /&gt;
In the .h files for your classes:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;vtkLibraryName.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Declare your classes as:&lt;br /&gt;
&lt;br /&gt;
 class VTK_LIBRARYNAME_EXPORT vtkMyClass : public vtkMySuperClass&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CMakeLists.txt should contain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONFIGURE_FILE(&lt;br /&gt;
  ${LIBRARYNAME_SOURCE_DIR}/vtkLibraryNameConfigure.h.in &lt;br /&gt;
  ${LIBRARYNAME_BINARY_DIR}/vtkLibraryNameConfigure.h&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==I still get linker errors==&lt;br /&gt;
If you still get the linker errors lnk2001 or lnk 2019 make sure that you declared the copy constructor and the assignment operator:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkMyClass(const vtkMyClass&amp;amp;);&lt;br /&gt;
void operator=(const vtkMyClass&amp;amp;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andreas</name></author>
		
	</entry>
</feed>