enamigi / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

VS2010 build issues (with patch) #91

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I tried to build leptonica in Visulac studio 2010 based on VS2008 solution from 
leptonica 1.68.
I was quite successful, but I needed to patch a code a little bit. See 
attachment.

Original issue reported on code.google.com by zde...@gmail.com on 27 Jan 2014 at 7:11

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I decided for my upcoming v1.70 Visual Studio 2008 Solution release to force 
Visual Studio to compile .c files using the newer VC++ compiler rather than its 
C compiler. Thus all configurations now set the global /TP switch [1]. 

The VC++ compiler CAN handle "arrays dimensioned by static const integers" (and 
in general is more compatible with the gcc c compiler). So none of the changes 
in the posted patch are necessary when the /TP switch is used.

See [2] for the rationale for changing to the VC++ compiler. It explicitly 
states:

   We recommend that C developers use the C++ compiler to compile C code
   (using /TP if the file is named something.c). This is the best choice for
   using Visual C++ to compile C code.

[1] http://msdn.microsoft.com/en-us/library/032xwy55(v=vs.90).aspx

[2] http://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/

Original comment by tomp2...@gmail.com on 27 Jan 2014 at 10:35

GoogleCodeExporter commented 9 years ago
Thanks tom. When do you expect to release windows library?

Original comment by zde...@gmail.com on 28 Jan 2014 at 7:49

GoogleCodeExporter commented 9 years ago
I want to compile x64 version leptonica in visual studio 2010. Any pointer?

Original comment by FreeT...@gmail.com on 26 Apr 2014 at 4:00