discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] msvc 2010 build problems


From: Dietmar Warning
Subject: [Discuss-gnuradio] msvc 2010 build problems
Date: Fri, 05 Dec 2014 11:01:58 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Hello,
I made an attempt to compile the actual git master branch with MSVC2010 under win 7. There some issues which I want list as follows. (Sorry for some german compiler
messages, but I think there are self explanatory.)

It would be fine if gnuradio can also be builded by MSVC compiler in the future as we had in the past.

Thanks,
Dietmar

prob 1 ---------------------------------------------------------------------------

This is a known issue with log2() and 'not', 'and', 'or' macros - see

http://lists.gnu.org/archive/html/discuss-gnuradio/2014-10/msg00413.html

diff --git a/cmake/msvc/config.h b/cmake/msvc/config.h
index 43792c7..4a56713 100644
--- a/cmake/msvc/config.h
+++ b/cmake/msvc/config.h
@@ -29,6 +29,18 @@ static inline long long llrintf(float x){return (long long)(x > 0.0f ? x + 0.5f static inline double rint(double x){return (x > 0.0)? floor(x + 0.5) : ceil(x - 0.5);} static inline float rintf(float x){return (x > 0.0f)? floorf(x + 0.5f) : ceilf(x - 0.5f);}

+#if (_MSC_VER <= 1600)
+static inline double log2 (double x)
+{
+  return log ((double)x) / log (2.0F);
+}
+#endif
+
+// Use of ISO-646 keyword ('not', 'and' etc. needs this header.
+#ifdef __cplusplus
+#include <ciso646>
+#endif
+
 ////////////////////////////////////////////////////////////////////////
 // math constants
 ////////////////////////////////////////////////////////////////////////


prob 2 ---------------------------------------------------------------------------

Also known problem, msvc can only make init in cc file, not in header file. - see:

https://gnuradio.org/redmine/issues/742

diff --git a/gr-dtv/lib/atsc/atsc_sync_impl.cc b/gr-dtv/lib/atsc/atsc_sync_impl.cc
index ec46d6b..38f2174 100644
--- a/gr-dtv/lib/atsc/atsc_sync_impl.cc
+++ b/gr-dtv/lib/atsc/atsc_sync_impl.cc
@@ -31,6 +31,9 @@
 namespace gr {
   namespace dtv {

+ const double atsc_sync_impl::LOOP_FILTER_TAP = 0.0005; // 0.0005 works + const double atsc_sync_impl::ADJUSTMENT_GAIN = 1.0e-5 / (10 * ATSC_DATA_SEGMENT_LENGTH);
+
     atsc_sync::sptr
     atsc_sync::make(float rate)
     {
diff --git a/gr-dtv/lib/atsc/atsc_sync_impl.h b/gr-dtv/lib/atsc/atsc_sync_impl.h
index eb0ad17..c3e2d61 100644
--- a/gr-dtv/lib/atsc/atsc_sync_impl.h
+++ b/gr-dtv/lib/atsc/atsc_sync_impl.h
@@ -34,8 +34,8 @@ namespace gr {
     class atsc_sync_impl : public atsc_sync
     {
     private:
-      static const double LOOP_FILTER_TAP = 0.0005;    // 0.0005 works
- static const double ADJUSTMENT_GAIN = 1.0e-5 / (10 * ATSC_DATA_SEGMENT_LENGTH);
+      static const double LOOP_FILTER_TAP;// = 0.0005;    // 0.0005 works
+ static const double ADJUSTMENT_GAIN;// = 1.0e-5 / (10 * ATSC_DATA_SEGMENT_LENGTH);
       static const int      SYMBOL_INDEX_OFFSET = 3;
       static const int      MIN_SEG_LOCK_CORRELATION_VALUE = 5;
       static const int      SSI_MIN = -16;


prob 3 --------------------------------------------------------------------------- Seems volk_malloc doesn't need pthreads because msvc using windows threads. The include is new compared to version 3.6.5.1.
#ifdef would be sufficient.

diff --git a/volk/lib/volk_malloc.c b/volk/lib/volk_malloc.c
index d5e1709..235793d 100644
--- a/volk/lib/volk_malloc.c
+++ b/volk/lib/volk_malloc.c
@@ -20,7 +20,6 @@
  * Boston, MA 02110-1301, USA.
  */

-#include <pthread.h>
 #include <volk/volk_malloc.h>
 #include <stdio.h>
 #include <stdlib.h>


prob 4 ---------------------------------------------------------------------------
new compiler error, has worked under 3.6.5.1

..\..\..\gr-audio\lib\portaudio\portaudio_source.cc(124): error C2039: 'write': Ist kein Element von '`global namespace'' ..\..\..\gr-audio\lib\portaudio\portaudio_source.cc(124): error C3861: "write": Bezeichner wurde nicht gefunden.

..\..\..\gr-audio\lib\portaudio\portaudio_sink.cc(121): error C2039: 'write': Ist kein Element von '`global namespace'' ..\..\..\gr-audio\lib\portaudio\portaudio_sink.cc(121): error C3861: "write": Bezeichner wurde nicht gefunden.


prob 5 --------------------------------------------------------------------------- As follows is a link problem. qwt.lib version (using qwt 6.1.1) is in the link list and was formerly used to build version 3.6.5.1 successful.
It seems that the decoration of the imported functions has changed.

------ Erstellen gestartet: Projekt: pygen_gnuradio_runtime_swig_42898, Konfiguration: Release Win32 ------ TimeRasterDisplayPlot.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall QwtInterval::QwtInterval(class QwtInterval const &)" (__imp_??0QwtInterval@@address@hidden@@Z)" in Funktion ""public: double __thiscall TimeRasterDisplayPlot::getMinIntensity(int)const " (address@hidden@@address@hidden)". WaterfallDisplayPlot.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall QwtInterval::QwtInterval(class QwtInterval const &)" (__imp_??0QwtInterval@@address@hidden@@Z)". plot_waterfall.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall QwtInterval::QwtInterval(class QwtInterval const &)" (__imp_??0QwtInterval@@address@hidden@@Z)". plot_raster.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall QwtInterval::QwtInterval(class QwtInterval const &)" (__imp_??0QwtInterval@@address@hidden@@Z)".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]