<div dir="ltr">I now have the core library compiling through CMake with the following invocation:<div><br></div><div><div>C:\Users\Gregory\Documents\building\sword-build&gt;cmake ..\sword -G&quot;Visual Studio 12&quot; -DBZIP2_LIBRARY=..\bzip2\Release\libbz2.lib -DBZIP2_INCLUDE_DIR=..\bzip2 -DXZ_LIBRARY=..\xz\bin_i486\liblzma.lib -DXZ_INCLUDE_DIR=..\xz\include -DICU_LIBRARY=..\icu-sword\lib\icuuc.lib -DICU_I18N_LIBRARY=..\icu-sword\lib\icuin.lib -DICU_DATA_LIBRARY=..\icu-sword\lib\icudt.lib -DICU_INCLUDE_DIR=..\icu-sword\include -DCURL_LIBRARY=..\curl\builds\libcurl-vc-x86-release-static-ipv6-sspi-spnego-winssl\lib\libcurl_a.lib -DCURL_INCLUDE_DIR=..\curl\include</div>
</div><div><br></div><div>This obviously requires Visual Studio 12 (2013). Change to &quot;Visual Studio 11&quot; if you are using the previous version, or the like. For me, this had to be invoked from the command line because CMake-GUI was forcing me to build 64-bit binaries. This also assumes you have the latest SVN of sword checked out into a directory called &quot;sword&quot;, that you are in a parallel directory (I named mine sword-build), and that you have followed all the same instructions that you would for invoking the regular build projects as documented in the wiki. If not, you might have to adjust the manually specified directories above. I hope to improve that automatic detection here in a little bit, but for the moment I&#39;m just happy it&#39;s compiling and kinda-almost-sorta running.</div>
<div><br></div><div>There are a LOT of redundant warnings, mainly about functions that are not declared as DLL export functions and some about casting variable types that are not present in the &quot;normal&quot; build. It will take me a while to track down exactly what is different between the two to eliminate those warnings. I also haven&#39;t tried throwing swig at these results yet, either.</div>
<div><br></div><div>--Greg</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 14, 2014 at 12:55 PM, Greg Hellings <span dir="ltr">&lt;<a href="mailto:greg.hellings@gmail.com" target="_blank">greg.hellings@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Tue, May 13, 2014 at 3:56 PM, Greg Hellings <span dir="ltr">&lt;<a href="mailto:greg.hellings@gmail.com" target="_blank">greg.hellings@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 13, 2014 at 3:48 PM, R Johnson <span dir="ltr">&lt;<a href="mailto:ps16thypresenceisfullnessofjoy@gmail.com" target="_blank">ps16thypresenceisfullnessofjoy@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, Greg and Ben.<div> </div></blockquote><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>If we could get that working, it would be great! Unfortunately, I don&#39;t have any experience with CMake either (in fact, I had never heard of it until I started trying to build Sword). But I&#39;m willing to learn, and will try to do what I can.<br>


</div>
<br>
Following the instructions in some of the Sword README files, I was successfully able to create a VS2010 project for Sword with CMake (with the argument -DSWORD_BINDINGS=&quot;Python&quot; added). But when I tried to build the Visual Studio project that it created, I got several errors. The output from the attempted build was 1625 lines, but many of them were not fatal errors, just warnings. I used a regex to remove all the warnings, and have attached the resulting file.<br>



<br>
It appears that the problem is that two header files cannot be found: &#39;dirent.h&#39; and &#39;inttypes.h&#39;. As far as I can tell, the former is in the Sword repository, but the latter is not (but is mentioned, along with HAVE_INTTYPES_H, in &#39;<a href="http://config.h.in" target="_blank">config.h.in</a>&#39; in the &#39;include&#39; directory). The fatal errors that I got afterwards are likely caused by the previous builds failing, I think. Perhaps the problem could be fixed by simply adding these files to the correct directory?<br>


</blockquote><div><br></div></div><div>dirent.h is present in most Linux/Unix environments but is absent in windows environments. There is an appropriate flag we will need to enable in CMakeLists.txt to tell SWORD to use the bundled dirent.h file. I believe it&#39;s just a matter of setting the appropriate include directory when building with MSVC (dirent.h is available when cross-compiling from MinGW but that doesn&#39;t really help the MSVC/Python case).<br>

</div></div></div></div></blockquote><div><br></div></div><div>I&#39;ve gotten past this compile error and identified a second one that Troy fixed (actually a known bug in MSVC that we created a workaround for). Now I need to fix its detection of dependent library include/link paths.<span class="HOEnZb"><font color="#888888"><br>

<br></font></span></div><span class="HOEnZb"><font color="#888888"><div>--Greg<br> <br></div></font></span><div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>
<br></div><div>I&#39;ll have to look into inttypes.h - it&#39;s probably an issue with finding the appropriate compiler flags to set. I know that Sword builds with and supports MSVC as there is a native MSVC build file that works fine with VS2010. So it&#39;s just a matter of garnering from it to figure out what CMake needs to do.<span><font color="#888888"><br>


<br></font></span></div><span><font color="#888888"><div>--Greg<br> <br></div></font></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>

<br>
Also, since the C# project solution file is unmaintained, do you think it would be a good idea to remove it from the repository? If that was done, it wouldn&#39;t cause confusion for other Sword newbies in the future like it did me.<br>



<br>
Thank you for your help.<br>
<br>
-- Timothy<br>
<br></div><div>_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br></div></blockquote></div><br></div></div>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div>