Skip to content Skip to sidebar Skip to footer

Installing Cld Libary On Windows And Bind To Python

I have a need to make use of Chromium's Compact Language Detector library within a Python script. AFAIK, there are two projects that leverage this library, but I have been having t

Solution 1:

Try this patch (works for me):

diff --git a/ports/python/setup.py b/ports/python/setup.py
index e1950c3..889f21a 100644
--- a/ports/python/setup.py
+++ b/ports/python/setup.py
@@ -9,7 +9,10 @@ def pkgconfig(*packages, **kw):

 module = Extension('cld',
                    ['pycldmodule.cc'],
-                   **pkgconfig('cld'))
+                   define_macros=[('WIN32', None)],
+                   libraries=['libcld'], 
+                   include_dirs=['..\\..\\'],
+                   library_dirs=['..\\..\\'])

 setup(name='cld',
       version='0.031415',

Post a Comment for "Installing Cld Libary On Windows And Bind To Python"