Changeset 1107


Ignore:
Timestamp:
10/10/08 09:43:58 (4 years ago)
Author:
Freddie Akeroyd
Message:

Add DLL_EXPORT for scons c++ on Windows. Refs #112.

Location:
trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1105 r1107  
    201201env.Install('Bin/Shared', ret['shared']) 
    202202env.Install('Bin/Static', ret['static']) 
     203 
     204ret = SConscript(['test/SConscript']) 
     205env.Install('Bin/Shared', ret['shared']) 
     206env.Install('Bin/Static', ret['static']) 
  • trunk/applications/NXtranslate/binary/BinaryRetriever.cpp

    r1001 r1107  
    1616using std::endl; 
    1717 
    18 static const string INT8("INT8"); 
    19 static const string INT16("INT16"); 
    20 static const string INT32("INT32"); 
    21 static const string UINT8("UINT8"); 
    22 static const string UINT16("UINT16"); 
    23 static const string UINT32("UINT32"); 
    24 static const string FLOAT32("FLOAT32"); 
    25 static const string FLOAT64("FLOAT64"); 
    26 static const string BYTE("BYTE"); 
     18static const string myINT8("INT8"); 
     19static const string myINT16("INT16"); 
     20static const string myINT32("INT32"); 
     21static const string myUINT8("UINT8"); 
     22static const string myUINT16("UINT16"); 
     23static const string myUINT32("UINT32"); 
     24static const string myFLOAT32("FLOAT32"); 
     25static const string myFLOAT64("FLOAT64"); 
     26static const string myBYTE("BYTE"); 
    2727 
    2828static const int DEFAULT_TYPE=NX_UINT32; 
     
    9797  if(str_type.empty()){ 
    9898    return DEFAULT_TYPE; 
    99   }else if(str_type==INT8){ 
     99  }else if(str_type==myINT8){ 
    100100    return NX_INT8; 
    101   }else if(str_type==INT16){ 
     101  }else if(str_type==myINT16){ 
    102102    return NX_INT16; 
    103   }else if(str_type==INT32){ 
     103  }else if(str_type==myINT32){ 
    104104    return NX_INT32; 
    105   }else if(str_type==UINT8){ 
     105  }else if(str_type==myUINT8){ 
    106106    return NX_UINT8; 
    107   }else if(str_type==UINT16){ 
     107  }else if(str_type==myUINT16){ 
    108108    return NX_UINT16; 
    109   }else if(str_type==UINT32){ 
     109  }else if(str_type==myUINT32){ 
    110110    return NX_UINT32; 
    111   }else if(str_type==FLOAT32){ 
     111  }else if(str_type==myFLOAT32){ 
    112112    return NX_FLOAT32; 
    113   }else if(str_type==FLOAT64){ 
     113  }else if(str_type==myFLOAT64){ 
    114114    return NX_FLOAT64; 
    115   }else if(str_type==BYTE){ 
     115  }else if(str_type==myBYTE){ 
    116116    return NX_CHAR; 
    117117  }else{ 
  • trunk/bindings/cpp/Makefile.am

    r1105 r1107  
    4040libNeXusCPP_la_LDFLAGS=@SHARED_LDFLAGS@ $(LDFLAGS) 
    4141 
    42 AM_CPPFLAGS=-I. -I$(top_srcdir)/include 
     42AM_CPPFLAGS=-I. -I$(top_srcdir)/include -DIN_NEXUS_CPP_LIBRARY=1 
    4343 
    4444include $(top_srcdir)/build_rules.am 
  • trunk/bindings/cpp/NeXusFile.cpp

    r1105 r1107  
    1717 
    1818template <typename NumT> 
    19 string toString(const vector<NumT>& data) { 
     19static string toString(const vector<NumT>& data) { 
    2020  stringstream result; 
    2121  result << "["; 
     
    4343  // template specialisations for types we know  
    4444  template<> 
    45   NXnumtype getType(float number) { 
     45  DLL_EXPORT NXnumtype getType(float number) { 
    4646    return FLOAT32; 
    4747  } 
    4848 
    4949  template<> 
    50   NXnumtype getType(double number) { 
     50  DLL_EXPORT NXnumtype getType(double number) { 
    5151    return FLOAT64; 
    5252  } 
    5353 
    5454  template<> 
    55   NXnumtype getType(int8_t number) { 
     55  DLL_EXPORT NXnumtype getType(int8_t number) { 
    5656    return INT8; 
    5757  } 
    5858 
    5959  template<> 
    60   NXnumtype getType(uint8_t number) { 
     60  DLL_EXPORT NXnumtype getType(uint8_t number) { 
    6161    return UINT8; 
    6262  } 
    6363 
    6464  template<> 
    65   NXnumtype getType(int16_t number) { 
     65  DLL_EXPORT NXnumtype getType(int16_t number) { 
    6666    return INT16; 
    6767  } 
    6868 
    6969  template<> 
    70   NXnumtype getType(uint16_t number) { 
     70  DLL_EXPORT NXnumtype getType(uint16_t number) { 
    7171    return UINT16; 
    7272  } 
    7373 
    7474  template<> 
    75   NXnumtype getType(int32_t number) { 
     75  DLL_EXPORT NXnumtype getType(int32_t number) { 
    7676    return INT32; 
    7777  } 
    7878 
    7979  template<> 
    80   NXnumtype getType(uint32_t number) { 
     80  DLL_EXPORT NXnumtype getType(uint32_t number) { 
    8181    return UINT32; 
    8282  } 
    8383 
    8484  template<> 
    85   NXnumtype getType(int64_t number) { 
     85  DLL_EXPORT NXnumtype getType(int64_t number) { 
    8686    return INT64; 
    8787  } 
    8888 
    8989  template<> 
    90   NXnumtype getType(uint64_t number) { 
     90  DLL_EXPORT NXnumtype getType(uint64_t number) { 
    9191    return UINT64; 
    9292  } 
     
    108108static int check_char_too_big[1 - sizeof(char) + ARRAY_OFFSET]; // error if char > 1 byte 
    109109 
    110 void inner_malloc(void* & data, std::vector<int>& dims, NXnumtype type) { 
     110static void inner_malloc(void* & data, std::vector<int>& dims, NXnumtype type) { 
    111111  int rank = dims.size(); 
    112112  int c_dims[NX_MAXRANK]; 
     
    121121 
    122122 
    123 void inner_free(void* & data) { 
     123static void inner_free(void* & data) { 
    124124  NXstatus status = NXfree(&data); 
    125125  if (status != NX_OK) { 
     
    921921/* ---------------------------------------------------------------- */ 
    922922template 
    923 void File::putAttr(const string& name, const float value); 
    924 template 
    925 void File::putAttr(const string& name, const double value); 
    926 template 
    927 void File::putAttr(const string& name, const int8_t value); 
    928 template 
    929 void File::putAttr(const string& name, const uint8_t value); 
    930 template 
    931 void File::putAttr(const string& name, const int16_t value); 
    932 template 
    933 void File::putAttr(const string& name, const uint16_t value); 
    934 template 
    935 void File::putAttr(const string& name, const int32_t value); 
    936 template 
    937 void File::putAttr(const string& name, const uint32_t value); 
    938 template 
    939 void File::putAttr(const string& name, const int64_t value); 
    940 template 
    941 void File::putAttr(const string& name, const uint64_t value); 
    942  
    943 template 
    944 float File::getAttr(const AttrInfo& info); 
    945 template 
    946 double File::getAttr(const AttrInfo& info); 
    947 template 
    948 int8_t File::getAttr(const AttrInfo& info); 
    949 template 
    950 uint8_t  File::getAttr(const AttrInfo& info); 
    951 template 
    952 int16_t File::getAttr(const AttrInfo& info); 
    953 template 
    954 uint16_t  File::getAttr(const AttrInfo& info); 
    955 template 
    956 int32_t File::getAttr(const AttrInfo& info); 
    957 template 
    958 uint32_t  File::getAttr(const AttrInfo& info); 
    959 template 
    960 int64_t File::getAttr(const AttrInfo& info); 
    961 template 
    962 uint64_t  File::getAttr(const AttrInfo& info); 
    963  
    964 template 
    965 void File::writeData(const string& name, const vector<float>& value); 
    966 template 
    967 void File::writeData(const string& name, const vector<double>& value); 
    968 template 
    969 void File::writeData(const string& name, const vector<int8_t>& value); 
    970 template 
    971 void File::writeData(const string& name, const vector<uint8_t>& value); 
    972 template 
    973 void File::writeData(const string& name, const vector<int16_t>& value); 
    974 template 
    975 void File::writeData(const string& name, const vector<uint16_t>& value); 
    976 template 
    977 void File::writeData(const string& name, const vector<int32_t>& value); 
    978 template 
    979 void File::writeData(const string& name, const vector<uint32_t>& value); 
    980 template 
    981 void File::writeData(const string& name, const vector<int64_t>& value); 
    982 template 
    983 void File::writeData(const string& name, const vector<uint64_t>& value); 
    984  
    985 template 
    986 void File::writeData(const string& name, const vector<float>& value, const std::vector<int>& dims); 
    987 template 
    988 void File::writeData(const string& name, const vector<double>& value, const std::vector<int>& dims); 
    989 template 
    990 void File::writeData(const string& name, const vector<int8_t>& value, const std::vector<int>& dims); 
    991 template 
    992 void File::writeData(const string& name, const vector<uint8_t>& value, const std::vector<int>& dims); 
    993 template 
    994 void File::writeData(const string& name, const vector<int16_t>& value, const std::vector<int>& dims); 
    995 template 
    996 void File::writeData(const string& name, const vector<uint16_t>& value, const std::vector<int>& dims); 
    997 template 
    998 void File::writeData(const string& name, const vector<int32_t>& value, const std::vector<int>& dims); 
    999 template 
    1000 void File::writeData(const string& name, const vector<uint32_t>& value, const std::vector<int>& dims); 
    1001 template 
    1002 void File::writeData(const string& name, const vector<int64_t>& value, const std::vector<int>& dims); 
    1003 template 
    1004 void File::writeData(const string& name, const vector<uint64_t>& value, const std::vector<int>& dims); 
    1005  
    1006 template 
    1007 void File::writeCompData(const string & name, const vector<float> & value, 
    1008                        const vector<int> & dims, const NXcompression comp, 
    1009                          const vector<int> & bufsize); 
    1010 template 
    1011 void File::writeCompData(const string & name, const vector<double> & value, 
    1012                          const vector<int> & dims, const NXcompression comp, 
    1013                          const vector<int> & bufsize); 
    1014 template 
    1015 void File::writeCompData(const string & name, const vector<int8_t> & value, 
    1016                          const vector<int> & dims, const NXcompression comp, 
    1017                          const vector<int> & bufsize); 
    1018 template 
    1019 void File::writeCompData(const string & name, const vector<uint8_t> & value, 
    1020                          const vector<int> & dims, const NXcompression comp, 
    1021                          const vector<int> & bufsize); 
    1022 template 
    1023 void File::writeCompData(const string & name, const vector<int16_t> & value, 
    1024                          const vector<int> & dims, const NXcompression comp, 
    1025                          const vector<int> & bufsize); 
    1026 template 
    1027 void File::writeCompData(const string & name, const vector<uint16_t> & value, 
    1028                          const vector<int> & dims, const NXcompression comp, 
    1029                          const vector<int> & bufsize); 
    1030 template 
    1031 void File::writeCompData(const string & name, const vector<int32_t> & value, 
    1032                          const vector<int> & dims, const NXcompression comp, 
    1033                          const vector<int> & bufsize); 
    1034 template 
    1035 void File::writeCompData(const string & name, const vector<uint32_t> & value, 
    1036                          const vector<int> & dims, const NXcompression comp, 
    1037                          const vector<int> & bufsize); 
    1038 template 
    1039 void File::writeCompData(const string & name, const vector<int64_t> & value, 
    1040                          const vector<int> & dims, const NXcompression comp, 
    1041                          const vector<int> & bufsize); 
    1042 template 
    1043 void File::writeCompData(const string & name, const vector<uint64_t> & value, 
    1044                          const vector<int> & dims, const NXcompression comp, 
    1045                          const vector<int> & bufsize); 
    1046  
    1047 template 
    1048 vector<float> * File::getData(); 
    1049 template 
    1050 vector<double> * File::getData(); 
    1051 template 
    1052 vector<int8_t> * File::getData(); 
    1053 template 
    1054 vector<uint8_t> * File::getData(); 
    1055 template 
    1056 vector<int16_t> * File::getData(); 
    1057 template 
    1058 vector<uint16_t> * File::getData(); 
    1059 template 
    1060 vector<int32_t> * File::getData(); 
    1061 template 
    1062 vector<uint32_t> * File::getData(); 
    1063 template 
    1064 vector<int64_t> * File::getData(); 
    1065 template 
    1066 vector<uint64_t> * File::getData(); 
    1067  
    1068 template 
    1069 void File::getData(vector<float>& data); 
    1070 template 
    1071 void File::getData(vector<double>& data); 
    1072 template 
    1073 void File::getData(vector<int8_t>& data); 
    1074 template 
    1075 void File::getData(vector<uint8_t>& data); 
    1076 template 
    1077 void File::getData(vector<int16_t>& data); 
    1078 template 
    1079 void File::getData(vector<uint16_t>& data); 
    1080 template 
    1081 void File::getData(vector<int32_t>& data); 
    1082 template 
    1083 void File::getData(vector<uint32_t>& data); 
    1084 template 
    1085 void File::getData(vector<int64_t>& data); 
    1086 template 
    1087 void File::getData(vector<uint64_t>& data); 
    1088  
    1089 template 
    1090 void File::putSlab(std::vector<float>& data, int start, int size); 
    1091 template 
    1092 void File::putSlab(std::vector<double>& data, int start, int size); 
    1093 template 
    1094 void File::putSlab(std::vector<int8_t>& data, int start, int size); 
    1095 template 
    1096 void File::putSlab(std::vector<uint8_t>& data, int start, int size); 
    1097 template 
    1098 void File::putSlab(std::vector<int16_t>& data, int start, int size); 
    1099 template 
    1100 void File::putSlab(std::vector<uint16_t>& data, int start, int size); 
    1101 template 
    1102 void File::putSlab(std::vector<int32_t>& data, int start, int size); 
    1103 template 
    1104 void File::putSlab(std::vector<uint32_t>& data, int start, int size); 
    1105 template 
    1106 void File::putSlab(std::vector<int64_t>& data, int start, int size); 
    1107 template 
    1108 void File::putSlab(std::vector<uint64_t>& data, int start, int size); 
     923DLL_EXPORT void File::putAttr(const string& name, const float value); 
     924template 
     925DLL_EXPORT void File::putAttr(const string& name, const double value); 
     926template 
     927DLL_EXPORT void File::putAttr(const string& name, const int8_t value); 
     928template 
     929DLL_EXPORT void File::putAttr(const string& name, const uint8_t value); 
     930template 
     931DLL_EXPORT void File::putAttr(const string& name, const int16_t value); 
     932template 
     933DLL_EXPORT void File::putAttr(const string& name, const uint16_t value); 
     934template 
     935DLL_EXPORT void File::putAttr(const string& name, const int32_t value); 
     936template 
     937DLL_EXPORT void File::putAttr(const string& name, const uint32_t value); 
     938template 
     939DLL_EXPORT void File::putAttr(const string& name, const int64_t value); 
     940template 
     941DLL_EXPORT void File::putAttr(const string& name, const uint64_t value); 
     942 
     943template 
     944DLL_EXPORT float File::getAttr(const AttrInfo& info); 
     945template 
     946DLL_EXPORT double File::getAttr(const AttrInfo& info); 
     947template 
     948DLL_EXPORT int8_t File::getAttr(const AttrInfo& info); 
     949template 
     950DLL_EXPORT uint8_t  File::getAttr(const AttrInfo& info); 
     951template 
     952DLL_EXPORT int16_t File::getAttr(const AttrInfo& info); 
     953template 
     954DLL_EXPORT uint16_t  File::getAttr(const AttrInfo& info); 
     955template 
     956DLL_EXPORT int32_t File::getAttr(const AttrInfo& info); 
     957template 
     958DLL_EXPORT uint32_t  File::getAttr(const AttrInfo& info); 
     959template 
     960DLL_EXPORT int64_t File::getAttr(const AttrInfo& info); 
     961template 
     962DLL_EXPORT uint64_t  File::getAttr(const AttrInfo& info); 
     963 
     964template 
     965DLL_EXPORT void File::writeData(const string& name, const vector<float>& value); 
     966template 
     967DLL_EXPORT void File::writeData(const string& name, const vector<double>& value); 
     968template 
     969DLL_EXPORT void File::writeData(const string& name, const vector<int8_t>& value); 
     970template 
     971DLL_EXPORT void File::writeData(const string& name, const vector<uint8_t>& value); 
     972template 
     973DLL_EXPORT void File::writeData(const string& name, const vector<int16_t>& value); 
     974template 
     975DLL_EXPORT void File::writeData(const string& name, const vector<uint16_t>& value); 
     976template 
     977DLL_EXPORT void File::writeData(const string& name, const vector<int32_t>& value); 
     978template 
     979DLL_EXPORT void File::writeData(const string& name, const vector<uint32_t>& value); 
     980template 
     981DLL_EXPORT void File::writeData(const string& name, const vector<int64_t>& value); 
     982template 
     983DLL_EXPORT void File::writeData(const string& name, const vector<uint64_t>& value); 
     984 
     985template 
     986DLL_EXPORT void File::writeData(const string& name, const vector<float>& value, const std::vector<int>& dims); 
     987template 
     988DLL_EXPORT void File::writeData(const string& name, const vector<double>& value, const std::vector<int>& dims); 
     989template 
     990DLL_EXPORT void File::writeData(const string& name, const vector<int8_t>& value, const std::vector<int>& dims); 
     991template 
     992DLL_EXPORT void File::writeData(const string& name, const vector<uint8_t>& value, const std::vector<int>& dims); 
     993template 
     994DLL_EXPORT void File::writeData(const string& name, const vector<int16_t>& value, const std::vector<int>& dims); 
     995template 
     996DLL_EXPORT void File::writeData(const string& name, const vector<uint16_t>& value, const std::vector<int>& dims); 
     997template 
     998DLL_EXPORT void File::writeData(const string& name, const vector<int32_t>& value, const std::vector<int>& dims); 
     999template 
     1000DLL_EXPORT void File::writeData(const string& name, const vector<uint32_t>& value, const std::vector<int>& dims); 
     1001template 
     1002DLL_EXPORT void File::writeData(const string& name, const vector<int64_t>& value, const std::vector<int>& dims); 
     1003template 
     1004DLL_EXPORT void File::writeData(const string& name, const vector<uint64_t>& value, const std::vector<int>& dims); 
     1005 
     1006template 
     1007DLL_EXPORT void File::writeCompData(const string & name, const vector<float> & value, 
     1008                                    const vector<int> & dims, const NXcompression comp, 
     1009                                    const vector<int> & bufsize); 
     1010template 
     1011DLL_EXPORT void File::writeCompData(const string & name, const vector<double> & value, 
     1012                                    const vector<int> & dims, const NXcompression comp, 
     1013                                    const vector<int> & bufsize); 
     1014template 
     1015DLL_EXPORT void File::writeCompData(const string & name, const vector<int8_t> & value, 
     1016                                    const vector<int> & dims, const NXcompression comp, 
     1017                                    const vector<int> & bufsize); 
     1018template 
     1019DLL_EXPORT void File::writeCompData(const string & name, const vector<uint8_t> & value, 
     1020                                    const vector<int> & dims, const NXcompression comp, 
     1021                                    const vector<int> & bufsize); 
     1022template 
     1023DLL_EXPORT void File::writeCompData(const string & name, const vector<int16_t> & value, 
     1024                                    const vector<int> & dims, const NXcompression comp, 
     1025                                    const vector<int> & bufsize); 
     1026template 
     1027DLL_EXPORT void File::writeCompData(const string & name, const vector<uint16_t> & value, 
     1028                                    const vector<int> & dims, const NXcompression comp, 
     1029                                    const vector<int> & bufsize); 
     1030template 
     1031DLL_EXPORT void File::writeCompData(const string & name, const vector<int32_t> & value, 
     1032                                    const vector<int> & dims, const NXcompression comp, 
     1033                                    const vector<int> & bufsize); 
     1034template 
     1035DLL_EXPORT void File::writeCompData(const string & name, const vector<uint32_t> & value, 
     1036                                    const vector<int> & dims, const NXcompression comp, 
     1037                                    const vector<int> & bufsize); 
     1038template 
     1039DLL_EXPORT void File::writeCompData(const string & name, const vector<int64_t> & value, 
     1040                                    const vector<int> & dims, const NXcompression comp, 
     1041                                    const vector<int> & bufsize); 
     1042template 
     1043DLL_EXPORT void File::writeCompData(const string & name, const vector<uint64_t> & value, 
     1044                                    const vector<int> & dims, const NXcompression comp, 
     1045                                    const vector<int> & bufsize); 
     1046 
     1047template 
     1048DLL_EXPORT vector<float> * File::getData(); 
     1049template 
     1050DLL_EXPORT vector<double> * File::getData(); 
     1051template 
     1052DLL_EXPORT vector<int8_t> * File::getData(); 
     1053template 
     1054DLL_EXPORT vector<uint8_t> * File::getData(); 
     1055template 
     1056DLL_EXPORT vector<int16_t> * File::getData(); 
     1057template 
     1058DLL_EXPORT vector<uint16_t> * File::getData(); 
     1059template 
     1060DLL_EXPORT vector<int32_t> * File::getData(); 
     1061template 
     1062DLL_EXPORT vector<uint32_t> * File::getData(); 
     1063template 
     1064DLL_EXPORT vector<int64_t> * File::getData(); 
     1065template 
     1066DLL_EXPORT vector<uint64_t> * File::getData(); 
     1067 
     1068template 
     1069DLL_EXPORT void File::getData(vector<float>& data); 
     1070template 
     1071DLL_EXPORT void File::getData(vector<double>& data); 
     1072template 
     1073DLL_EXPORT void File::getData(vector<int8_t>& data); 
     1074template 
     1075DLL_EXPORT void File::getData(vector<uint8_t>& data); 
     1076template 
     1077DLL_EXPORT void File::getData(vector<int16_t>& data); 
     1078template 
     1079DLL_EXPORT void File::getData(vector<uint16_t>& data); 
     1080template 
     1081DLL_EXPORT void File::getData(vector<int32_t>& data); 
     1082template 
     1083DLL_EXPORT void File::getData(vector<uint32_t>& data); 
     1084template 
     1085DLL_EXPORT void File::getData(vector<int64_t>& data); 
     1086template 
     1087DLL_EXPORT void File::getData(vector<uint64_t>& data); 
     1088 
     1089template 
     1090DLL_EXPORT void File::putSlab(std::vector<float>& data, int start, int size); 
     1091template 
     1092DLL_EXPORT void File::putSlab(std::vector<double>& data, int start, int size); 
     1093template 
     1094DLL_EXPORT void File::putSlab(std::vector<int8_t>& data, int start, int size); 
     1095template 
     1096DLL_EXPORT void File::putSlab(std::vector<uint8_t>& data, int start, int size); 
     1097template 
     1098DLL_EXPORT void File::putSlab(std::vector<int16_t>& data, int start, int size); 
     1099template 
     1100DLL_EXPORT void File::putSlab(std::vector<uint16_t>& data, int start, int size); 
     1101template 
     1102DLL_EXPORT void File::putSlab(std::vector<int32_t>& data, int start, int size); 
     1103template 
     1104DLL_EXPORT void File::putSlab(std::vector<uint32_t>& data, int start, int size); 
     1105template 
     1106DLL_EXPORT void File::putSlab(std::vector<int64_t>& data, int start, int size); 
     1107template 
     1108DLL_EXPORT void File::putSlab(std::vector<uint64_t>& data, int start, int size); 
    11091109 
    11101110template  
    1111 void File::getAttr(const std::string& name, double& value); 
     1111DLL_EXPORT void File::getAttr(const std::string& name, double& value); 
    11121112template  
    1113 void File::getAttr(const std::string& name, int& value); 
     1113DLL_EXPORT void File::getAttr(const std::string& name, int& value); 
  • trunk/bindings/cpp/NeXusFile.hpp

    r1105 r1107  
    99 
    1010#ifdef _WIN32 
    11 #define DLL_EXPORT __declspec(dllexport) 
     11#  if IN_NEXUS_CPP_LIBRARY 
     12#    define DLL_EXPORT __declspec(dllexport) 
     13#  else 
     14#    define DLL_EXPORT __declspec(dllimport) 
     15#  endif 
    1216#else 
    13 #define DLL_EXPORT  
     17#  define DLL_EXPORT  
    1418#endif /* _WIN32 */ 
    1519 
     
    538542   * This function returns the NXnumtype given a concrete number. 
    539543   */ 
    540   template <typename NumT> 
    541   NXnumtype getType(NumT number = NumT()); 
     544   template <typename NumT> 
     545     DLL_EXPORT NXnumtype getType(NumT number = NumT()); 
    542546 
    543547 
  • trunk/bindings/cpp/NeXusStream.cpp

    r1101 r1107  
    174174} 
    175175 
    176 template class AttrHolder<double>; 
    177 template class AttrHolder<int>; 
    178  
    179 template class DataHolder<double>; 
    180 template class DataHolder<int>; 
     176template class DLL_EXPORT AttrHolder<double>; 
     177template class DLL_EXPORT AttrHolder<int>; 
     178 
     179template class DLL_EXPORT DataHolder<double>; 
     180template class DLL_EXPORT DataHolder<int>; 
    181181 
    182182void Data::readFromFile(File& nf) const 
  • trunk/bindings/cpp/NeXusStream.hpp

    r1105 r1107  
    5050{ 
    5151    // interface implemented by all serialisable NeXus components 
    52     class ISerialisable 
     52    class DLL_EXPORT ISerialisable 
    5353    { 
    5454      public: 
     
    5959    enum StreamModifier { Close=0 }; 
    6060 
    61     class HolderBase : public ISerialisable 
     61    class DLL_EXPORT HolderBase : public ISerialisable 
    6262    { 
    6363      protected: 
     
    7575 
    7676    template<typename NumT> 
    77     class AttrHolder : public HolderBase 
     77    class DLL_EXPORT AttrHolder : public HolderBase 
    7878    { 
    7979      protected: 
     
    9595    }; 
    9696 
    97     class Attr : public ISerialisable 
     97    class DLL_EXPORT Attr : public ISerialisable 
    9898    { 
    9999      protected: 
     
    121121 
    122122     
    123     class ObjectWithAttr : public ISerialisable 
     123    class DLL_EXPORT ObjectWithAttr : public ISerialisable 
    124124    { 
    125125       protected: 
     
    164164    }; 
    165165     
    166     class Group : public ObjectWithAttr 
     166    class DLL_EXPORT Group : public ObjectWithAttr 
    167167    { 
    168168      protected: 
     
    193193 
    194194    template<typename NumT> 
    195     class DataHolder : public HolderBase 
     195    class DLL_EXPORT DataHolder : public HolderBase 
    196196    { 
    197197      protected: 
     
    214214    }; 
    215215 
    216     class Data : public ObjectWithAttr 
     216    class DLL_EXPORT Data : public ObjectWithAttr 
    217217    { 
    218218        HolderBase* m_holder; 
     
    245245    }; 
    246246 
    247    File& operator<<(File& nf, const ISerialisable& obj); 
    248    File& operator>>(File& nf, const ISerialisable& obj); 
    249  
    250  
    251    File& operator<<(File& nf, const StreamModifier sm); 
    252    File& operator>>(File& nf, const StreamModifier sm); 
     247   DLL_EXPORT File& operator<<(File& nf, const ISerialisable& obj); 
     248   DLL_EXPORT File& operator>>(File& nf, const ISerialisable& obj); 
     249 
     250   DLL_EXPORT File& operator<<(File& nf, const StreamModifier sm); 
     251   DLL_EXPORT File& operator>>(File& nf, const StreamModifier sm); 
    253252 
    254253  } // Stream 
  • trunk/bindings/cpp/SConscript

    r1104 r1107  
    4848myenv = env.Clone() 
    4949myenv.Append(CPPPATH=['#include']) 
     50myenv.Append(CPPDEFINES=[('IN_NEXUS_CPP_LIBRARY',1)]) 
    5051myenv_static=myenv.Clone() 
    5152myenv_dynamic=myenv.Clone() 
Note: See TracChangeset for help on using the changeset viewer.