<div dir="ltr">First time poster, long time user. Great work cmake team!<br><div class="gmail_quote"><div dir="ltr"><br>I&#39;m trying to get cmake to detect several kernel32 functions but I can&#39;t get cmake to find the actual functions. I&#39;ve tried taking CheckFunctionExists.c and compiling it in a seperate projects and everything works as expected. The linker lists kernel32.lib in the error output. <br>

<br>Below is visual studio 6 output, but visual studio 8 has the same issue. Going back to CMake 2.4 doesn&#39;t help either. Trying with other kernel functions such as CreateFileMappingA doesn&#39;t work either.<br><br>
I&#39;m stuck; I couldn&#39;t find anything i think is releveant in the cmake mailing list archives or on google. Any idea where things are going wrong? <br>
<br><br>Thanks,<br>Ben<br>---<br><br>Determining if the function &lt;ol&gt;&lt;li&gt;MapView&lt;/li&gt;&lt;/ol&gt;OfFile exists failed with the following output:<br>Change Dir: D:/projects/svn_clucene2_4_3-reloaded/msvc6/CMakeFiles/CMakeTmp<br>

<br>Run Build Command:C:\PROGRA~1\MICROS~3\Common\MSDev98\Bin\<a href="http://MSDEV.COM" target="_blank">MSDEV.COM</a> CMAKE_TRY_COMPILE.dsw /MAKE &quot;cmTryCompileExec - Debug&quot; /BUILD<br>--------------------Configuration: cmTryCompileExec - Win32 Debug--------------------<br>

<br>Compiling...<br><br>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86<br><br>Copyright (C) Microsoft Corp 1984-1998. All rights reserved.<br><br>cl /MDd /W3 /Zi /Od /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_CONSOLE&quot; /D &quot;_WINDOWS&quot; /D CHECK_FUNCTION_EXISTS=MapViewOfFile /D &quot;_MBCS&quot; /D CMAKE_INTDIR=\&quot;Debug\&quot; /Fo&quot;Debug/&quot; /Fd&quot;Debug/&quot; /FD /GZ&nbsp;&nbsp; /Zm1000&nbsp; /GZ&nbsp; /TC /c <br>

<br>&nbsp;&nbsp; &quot;C:\Program Files\CMake 2.6\share\cmake-2.6\Modules\CheckFunctionExists.c&quot;<br><br>CheckFunctionExists.c<br><br>Linking...<br><br>Microsoft (R) Incremental Linker Version 6.00.8168<br><br>Copyright (C) Microsoft Corp 1992-1998. All rights reserved.<br>

<br>kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /version:0.0 /stack:0x989680 /subsystem:console /incremental:yes &quot;/pdb:D:\projects\svn_clucene2_4_3-reloaded\msvc6\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec.pdb&quot; /debug /machine:I386 &quot;/out:D:\projects\svn_clucene2_4_3-reloaded\msvc6\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec.exe&quot; /pdbtype:sept /IGNORE:4089 /implib:D:\projects\svn_clucene2_4_3-reloaded\msvc6\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.lib <br>

<br>&quot;.\Debug\CheckFunctionExists.obj&quot; <br><br>CheckFunctionExists.obj : error LNK2001: unresolved external symbol _MapViewOfFile<br><br>D:\projects\svn_clucene2_4_3-reloaded\msvc6\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec.exe : fatal error LNK1120: 1 unresolved externals<br>

<br>Error executing link.exe.<br><br><br><br>cmTryCompileExec.exe - 2 error(s), 0 warning(s)<br><br><br></div>
</div><br></div>