summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-17 09:03:25 -0800
committerJosh Blum <josh@joshknows.com>2010-11-17 09:03:25 -0800
commit755569e66f7a939aa9392a79bf637d823fb78b84 (patch)
tree2c82863729abcc314b83e38ff82b270c5c4092b6 /host
parentc5043c6aec21c9acadfb81594e5c7d10709fdba5 (diff)
downloaduhd-755569e66f7a939aa9392a79bf637d823fb78b84.tar.gz
uhd-755569e66f7a939aa9392a79bf637d823fb78b84.tar.bz2
uhd-755569e66f7a939aa9392a79bf637d823fb78b84.zip
uhd: ranges symbol fix, try extern macro
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/config.hpp3
-rw-r--r--host/include/uhd/types/ranges.hpp4
-rw-r--r--host/lib/types.cpp7
3 files changed, 12 insertions, 2 deletions
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp
index 2918c2340..043e8d884 100644
--- a/host/include/uhd/config.hpp
+++ b/host/include/uhd/config.hpp
@@ -75,13 +75,16 @@
#ifdef UHD_DLL // defined if UHD is compiled as a DLL
#ifdef UHD_DLL_EXPORTS // defined if we are building the UHD DLL (instead of using it)
#define UHD_API UHD_HELPER_DLL_EXPORT
+ #define EXIMP_TEMPLATE extern
#else
#define UHD_API UHD_HELPER_DLL_IMPORT
+ #define EXIMP_TEMPLATE
#endif // UHD_DLL_EXPORTS
#define UHD_LOCAL UHD_HELPER_DLL_LOCAL
#else // UHD_DLL is not defined: this means UHD is a static lib.
#define UHD_API
#define UHD_LOCAL
+ #define EXIMP_TEMPLATE
#endif // UHD_DLL
// Define force inline macro
diff --git a/host/include/uhd/types/ranges.hpp b/host/include/uhd/types/ranges.hpp
index 623bdca19..25120de40 100644
--- a/host/include/uhd/types/ranges.hpp
+++ b/host/include/uhd/types/ranges.hpp
@@ -105,11 +105,11 @@ namespace uhd{
};
//! export a symbol for the gain range type
- template struct UHD_API meta_range_t<float>;
+ EXIMP_TEMPLATE template struct UHD_API meta_range_t<float>;
typedef meta_range_t<float> gain_range_t;
//! export a symbol for the freq range type
- template struct UHD_API meta_range_t<double>;
+ EXIMP_TEMPLATE template struct UHD_API meta_range_t<double>;
typedef meta_range_t<double> freq_range_t;
diff --git a/host/lib/types.cpp b/host/lib/types.cpp
index 8ccb664d5..bea20a4aa 100644
--- a/host/lib/types.cpp
+++ b/host/lib/types.cpp
@@ -21,6 +21,7 @@
#include <uhd/types/clock_config.hpp>
#include <uhd/types/stream_cmd.hpp>
#include <uhd/types/metadata.hpp>
+#include <uhd/types/ranges.hpp>
#include <uhd/types/time_spec.hpp>
#include <uhd/types/device_addr.hpp>
#include <uhd/types/mac_addr.hpp>
@@ -40,6 +41,12 @@
using namespace uhd;
/***********************************************************************
+ * ranges template instantiation
+ **********************************************************************/
+template struct uhd::meta_range_t<float>;
+template struct uhd::meta_range_t<double>;
+
+/***********************************************************************
* tune request
**********************************************************************/
tune_request_t::tune_request_t(double target_freq):