The CMakeLists is like this:<br><br>cmake_minimum_required(VERSION 2.6)<br>project(test)<br><br>include_directories(D:/Works/mixed/c/CImage/CImg-1.3.7)<br>add_executable(test compare.cpp) <br><br>I can build it successfully,but when I rub it will get a run time &quot;Debug Error!&quot;.<br>
<br>But it works in another project using the same library , the BuildLog as follows:<br><br><table width="" cellpadding="0" cellspacing="0"><tbody><tr><td width="0" bgcolor="#ffffff"> </td><td width="*"><pre>Creating temporary file &quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\RSP00000118242128.rsp&quot; with contents<br>
[<br>/Ox /Oi /GL /I &quot;..\..\\&quot; /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_CONSOLE&quot; /D &quot;_UNICODE&quot; /D &quot;UNICODE&quot; /FD /EHsc /MD /Gy /Fo&quot;Release\\&quot; /Fd&quot;Release\vc90.pdb&quot; /W3 /c /Zi /TP &quot;..\..\examples\CImg_demo.cpp&quot;<br>
]<br>Creating command line &quot;cl.exe @&quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\RSP00000118242128.rsp&quot; /nologo /errorReport:prompt&quot;<br>Creating temporary file &quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\RSP00000218242128.rsp&quot; with contents<br>
[<br>/OUT:&quot;D:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\project_win_visualcpp.exe&quot; /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:&quot;Release\project_win_visualcpp.exe.intermediate.manifest&quot; /MANIFESTUAC:&quot;level=&#39;asInvoker&#39; uiAccess=&#39;false&#39;&quot; /DEBUG /PDB:&quot;D:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\project_win_visualcpp.pdb&quot; /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib<br>
<br>&quot;.\Release\CImg_demo.obj&quot;<br>]<br>Creating command line &quot;link.exe @&quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\RSP00000218242128.rsp&quot; /NOLOGO /ERRORREPORT:PROMPT&quot;<br>
Creating temporary file &quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\RSP00000318242128.rsp&quot; with contents<br>[<br>/outputresource:&quot;.\Release\project_win_visualcpp.exe;#1&quot; /manifest<br>
<br>&quot;.\Release\project_win_visualcpp.exe.intermediate.manifest&quot;<br>]<br>Creating command line &quot;mt.exe @&quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\RSP00000318242128.rsp&quot; /nologo&quot;<br>
Creating temporary file &quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\BAT00000418242128.bat&quot; with contents<br>[<br>@echo Manifest resource last updated at %TIME% on %DATE% &gt; &quot;.\Release\mt.dep&quot;<br>
]<br>Creating command line &quot;&quot;&quot;d:\Works\mixed\c\CImage\CImg-1.3.7\resources\project_win_visualcpp\Release\BAT00000418242128.bat&quot;&quot;&quot;<br></pre></td></tr></tbody></table><br>How to solve this issue?<br>