<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>The problem has been solved! CMake seems to be tricky in some way, it may be because I don't know it so much, in case other rookie run into the same problem, I would write down what I've observed:</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>1. The reason to cause my earlier problem is that the configuration should set up automatically </span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span
class="Apple-style-span" style="font-family: Tahoma; ">FLTK_IMAGES_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkimagesd.lib</span><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span style="border-collapse: separate; font-family: Tahoma; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: 16px; ">FLTK_FORMS_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkformsd.lib</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span style="border-collapse: separate; font-family: Tahoma; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: medium; ">FLTK_BASE_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkd.lib</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span style="border-collapse: separate; font-family: Tahoma;
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: 16px; ">FLTK_GL_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkgld.lib</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span style="border-collapse: separate; font-family: Tahoma; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: 16px; "><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>I didn't got these at the first place, it might be because that I forgot to opt USE_FLTK after I re-configure, </span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>BUT, I also need to set up manually </span><span style="border-collapse: separate; font-family: Tahoma; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "><font
face="'times new roman', 'new york', times, serif">FLTK_FLUID_EXECUTABLE and </font></span><span class="Apple-style-span" style="font-family: times, serif; ">FLTK_INCLUDE_DIR before press configure button, </span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span class="Apple-style-span" style="font-family: times, serif; ">otherwise although it will prompt the two are missing, </span><span class="Apple-style-span" style="font-family: times, serif; ">it still doesn't figure out the 4 libraries (no warning!) after making it up,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span class="Apple-style-span" style="font-family: times, serif; ">it needs to delete the cache and start over!</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman',
'new york', times, serif; font-size: 12pt; ">2. CMake doesn't work properly if Visual Studio is set to be opened with administrator privilege.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Ryan Guan <ryan.guan@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> "insight-users@itk.org" <insight-users@itk.org><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 8, 2011 9:39 AM<br><b><span style="font-weight: bold;">Subject:</span></b> help in FLTK/InsightApplication CMake config<br></font><br>
<div id="yiv1064668884"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; ">Dear ITKers,</span><br></div><div style="font-size: 12pt; font-family: times, serif; "><div style="font-size: 12pt; font-family: times, serif; "><div id="yiv1064668884"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: times, serif; "><div style="font-family: times, serif; "><br></div><div style="font-family: times, serif; ">Please help to look at what's wrong with my CMake setting when I tried to build InsightApplication <span class="yiv1064668884Apple-style-span" style="background-color: rgb(230, 230, 230); font-family: sans-serif; ">3.20.0 </span>with FLTK <span
class="yiv1064668884Apple-style-span" style="background-color: rgb(230, 230, 230); font-family: sans-serif; ">1.3.0</span>.</div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; "><br></span></div><div style="font-family: times, serif; "><b><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; ">IDE: Windows 7, VS2008</span><font class="yiv1064668884Apple-style-span" face="sans-serif">.</font></b></div><div style="font-family: times, serif; "><font class="yiv1064668884Apple-style-span" color="#000000"><span class="yiv1064668884Apple-style-span" style="background-color: rgb(230, 230, 230); font-family: sans-serif; "><br></span></font></div><div style="font-family: times, serif; ">FLTK was built successfully using CMake and VS2008 in Debug mode at <font class="yiv1064668884Apple-style-span" color="#ff0000">C:/Project/fltk-1.3.0</font> (the binary directory for
FLTK CMake), </div><div style="font-family: times, serif; "><font class="yiv1064668884Apple-style-span" size="3">and was installed to </font><span class="yiv1064668884Apple-style-span" style="font-family: 'Times New Roman'; "><font class="yiv1064668884Apple-style-span" color="#ff0000">C:/Program Files (x86)/FLTK</font></span><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 128, 0); font-family: 'Times New Roman'; ">.</span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span"><font class="yiv1064668884Apple-style-span" face="'times new roman', 'new york', times, serif">FLTK_FLUID_EXECUTABLE = C:/Program Files (x86)/FLTK/bin/fluid.exe</font><br></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; ">FLTK_INCLUDE_DIR = </span><span
class="yiv1064668884Apple-style-span"><font class="yiv1064668884Apple-style-span" face="'times new roman', 'new york', times, serif">C:/Program Files (x86)/FLTK/include</font></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; ">The </span><span class="yiv1064668884Apple-style-span"><font class="yiv1064668884Apple-style-span" color="#ff0000">C:/Program Files (x86)/FLTK/lib</font></span><span class="yiv1064668884Apple-style-span" style="color:rgb(0, 128, 0);"> </span>contains<span class="yiv1064668884Apple-style-span" style="color:rgb(0, 128, 0);"> </span><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; "><font class="yiv1064668884Apple-style-span" color="#00bf60">fltkimagesd.lib fltkd.lib</font> etc.</span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-size: 16px; font-family:
times, serif; "><br></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-size: 16px; font-family: times, serif; ">I was not sure what FLTK_DIR I should define for InsightApplication (build in Debug mode too), so I tried </span><font class="yiv1064668884Apple-style-span" color="#008000"><span class="yiv1064668884Apple-style-span" style="font-size:12px;"><br></span></font></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-size: 16px; font-family: times, serif; "><br></span></div><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: times, serif; "><span class="yiv1064668884Apple-style-span"
style="font-family: times, serif; "><1><span class="yiv1064668884Apple-style-span" style="font-size:16px;"> </span><span class="yiv1064668884Apple-style-span" style="font-family: 'Times New Roman'; "><font class="yiv1064668884Apple-style-span" color="#ff0000">C:/Program Files (x86)/FLTK</font>, can configure,</span><br></span>but build-error in VS: fatal error LNK1104: cannot open file 'fltk_images.lib'. <div>build command requires fltk_images.lib fltk_jpeg.lib fltk_png.lib fltk_zlib.lib...</div><div><br></div><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; "><2> </span>so I instead tried <font class="yiv1064668884Apple-style-span" color="#ff0000">C:/Program Files (x86)/FLTK/CMake</font>, as inspired by an earlier post. <div>but the configure can't complete because it can't load CMakeCache.txt.</div><div>I
copied CMakeCache.txt from <span class="yiv1064668884Apple-style-span" style="font-size: 16px; font-family: times, serif; ">C:/Project/fltk-1.3.0 over, can configure.</span></div><div>build error in VS: fatal error LNK1104: cannot open file 'fltk_zlib.lib'</div><div>build command requires differently this time: "C:\Program Files (x86)\FLTK\lib\fltkimagesd.lib" "C:\Program Files (x86)\FLTK\lib\fltkjpegd.lib" "C:\Program Files (x86)\FLTK\lib\fltkpng.lib" fltk_zlib.lib "C:\Program Files (x86)\FLTK\lib\fltkd.lib" ...</div><div><br></div><div>Seems that it get all right with the debug library except zlib!</div><div><br></div></blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;
font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="font-family: times, serif; "><3> </span><span class="yiv1064668884Apple-style-span" style="font-size: 16px; font-family: times, serif; "> At last I tried </span><font class="yiv1064668884Apple-style-span" color="#ff0000" style="font-size: 16px; font-family: times, serif; ">C:/Project/fltk-1.3.0</font><span class="yiv1064668884Apple-style-span" style="font-size: 16px; font-family: times, serif; ">, the same error and command line as <span class="yiv1064668884Apple-style-span"><1></span>.</span></blockquote><font class="yiv1064668884Apple-style-span" style="font-family: times, serif; "><div><br></div></font><div style="font-family: times, serif; "><font class="yiv1064668884Apple-style-span" face="'times new roman', 'new york', times, serif"><2> seems to be more correct as it might read settings in <font
class="yiv1064668884Apple-style-span" color="#00bf60">FLTKLibraries-debug.cmake</font> in </font><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);">C:/Program Files (x86)/FLTK/CMake</span> so that it get the lib files correct, but why only fltk_z is not
correct?</div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><br></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; ">Hope someone can enlighten me here that what's wrong and what else might be wrong in my settings? </span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0,
0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; ">Many many thanks!</span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; ">Ryan</span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span"
style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span" style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div><div style="font-family: times, serif; "><span class="yiv1064668884Apple-style-span"
style="color:rgb(255, 0, 0);"><span class="yiv1064668884Apple-style-span" style="color: rgb(0, 0, 0); font-family: times, serif; "><br></span></span></div></div></div></div><br><br></div></div></div></div></div><br><br></div></div></div></body></html>