Open
Description
I've been able to compile echoprint extension with MSVC after these patches:
diff --git a/echoprint.cpp b/echoprint.cpp
index 25a32f5..d9a4016 100644
--- a/echoprint.cpp
+++ b/echoprint.cpp
@@ -7,11 +7,11 @@ static PyObject * echoprint_codegen(PyObject *self, PyObject *args) {
int start_offset = 0;
PyObject *item;
float *samples;
- uint num_samples;
- uint i;
+ unsigned int num_samples;
+ unsigned int i;
Codegen *pCodegen;
PyObject *result;
diff --git a/libcodegen/Codegen.h b/libcodegen/Codegen.h
index 5923d51..7c88327 100644
--- a/libcodegen/Codegen.h
+++ b/libcodegen/Codegen.h
@@ -13,17 +13,8 @@
#include <string>
#include <vector>
-#ifdef _MSC_VER
- #ifdef CODEGEN_EXPORTS
- #define CODEGEN_API __declspec(dllexport)
- #pragma message("Exporting codegen.dll")
- #else
- #define CODEGEN_API __declspec(dllimport)
- #pragma message("Importing codegen.dll")
- #endif
-#else
- #define CODEGEN_API
-#endif
+#define CODEGEN_API __declspec(dllexport)
+#pragma message("Exporting codegen.dll")
class Fingerprint;
class SubbandAnalysis;
diff --git a/setup.py b/setup.py
index 27f7643..11cfa0b 100644
--- a/setup.py
+++ b/setup.py
@@ -10,13 +10,12 @@ echoprint_ext = Extension(
'libcodegen/Codegen.cxx',
'libcodegen/Fingerprint.cxx',
'libcodegen/MatrixUtility.cxx',
- 'libcodegen/Metadata.cxx',
'libcodegen/SubbandAnalysis.cxx',
'libcodegen/Whitening.cxx',
'echoprint.cpp',
],
- include_dirs=['/usr/include/taglib', 'libcodegen'],
- libraries=['tag', 'z', 'pthread'],
+ include_dirs=['zlib-1.2.8', 'libcodegen'],
+ libraries=['zlib'],
)
However test fails:
======================================================================
FAIL: test_codegen (tests.EchoprintTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\src\python-echoprint\tests.py", line 8, in test_codegen
self.assertEqual(d['code'], 'eJydz7sNAzAIRdGV-GPGiQHvP0KcypVdpDnNFUIPANDhAdWL963AC7T_YbrSnjJMocwJo7Qy5FAELdcqtpBt6Eu38I0r4MH7e-3iroTDooJAZO7LO2AWeszaBXyXt_anXgQlcBr_QIy12Qh')
AssertionError: 'eJyd0juuQyEMRdEp2cbYZjjgz_yHEKrHy1VCkWYVW0I6CAAAFX6G4sb9LMMNtBtMN3q_cV_V2g2U32n0FUusWpTsn0h1NukQooQjImVPwiSn-0PlsIm1pe33K9S06QOOgjw0Q7YNMEEW7U1vRvGhMzBqmpTi2B23KNkjBg83YEOblrz0Q5WwV5jmWUsXct65YES9_T3dsC-ryO8mnwCPfZ2qsC2_16H2QH7jzw0Q4vGHW94A==' != 'eJydz7sNAzAIRdGV-GPGiQHvP0KcypVdpDnNFUIPANDhAdWL963AC7T_YbrSnjJMocwJo7Qy5FAELdcqtpBt6Ezu38I04MH7e-3iroTDooJAZO7LO2AWeszaBXyXt_anXgQlcBr_QIy12Qh'
----------------------------------------------------------------------
Ran 1 test in 0.073s
FAILED (failures=1)
My compile generates signature with 245 characters, while test asserts equal signature with length of 145 characters.
Can someone point the reason for this failure?
Thanks
Metadata
Metadata
Assignees
Labels
No labels