Errors Building GNUHAWK with REDHAWK 2.0 - redhawksdr

Is it possible to build GNUHawk with REDHAWK 2.0? I understand that GNUHAWK is a rather old package but it would be very convenient.
I have successfully built Redhawk 2.0
I am using Boost 1.6
And I am running Centos 6.7
I have cloned the integration-gnuhawk repository and after installing the required dependencies and running ./reconf, ./configure, make it appears that the volk module of gnuradio builds properly. However when errors are encountered when trying to build the gnuhawk library.
First I get:
In file included from ../include/gnuhawk/gruel/msg_accepter.h:27,
from ../include/gnuhawk/gr_msg_accepter.h:26,
from ../include/gnuhawk/gr_basic_block.h:30,
from gr_basic_block.cc:27:
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:125: error: ISO C++ forbids declaration of ‘Consumer_i’ with no type
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:125: error: expected ‘;’ before ‘*’ token
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:140: error: ‘Consumer_i’ was not declared in this scope
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:140: error: template argument 2 is invalid
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:140: error: template argument 4 is invalid
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:143: error: ISO C++ forbids declaration of ‘SupplierAdmin_i’ with no type
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:143: error: expected ‘;’ before ‘*’ token
Then I see many messages similar to these
In file included from ../include/gnuhawk/gnuhawk.h:26,
from ../include/gnuhawk/gr_msg_accepter.h:27,
from ../include/gnuhawk/gr_basic_block.h:30,
from gr_basic_block.cc:27:
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]’:
../include/gnuhawk/gr_properties.h:412: error: cannot allocate an object of abstract type ‘GR_StringProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_StringProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
Here is the entire output of "make":
Making all in gnuradio/volk
make[1]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[2]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[3]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[3]: Circular include/volk/volk_cpu.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk.h <- include/volk/volk.h dependency dropped.
make[3]: Circular include/volk/volk_typedefs.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk_typedefs.h <- include/volk/volk.h dependency dropped.
make[3]: Circular include/volk/volk_typedefs.h <- include/volk/volk_typedefs.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk_typedefs.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk_config_fixed.h dependency dropped.
make[3]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[3]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[3]: Circular include/volk/volk_cpu.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk.h <- include/volk/volk.h dependency dropped.
make[3]: Circular include/volk/volk_typedefs.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk_typedefs.h <- include/volk/volk.h dependency dropped.
make[3]: Circular include/volk/volk_typedefs.h <- include/volk/volk_typedefs.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk_cpu.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk_typedefs.h dependency dropped.
make[3]: Circular include/volk/volk_config_fixed.h <- include/volk/volk_config_fixed.h dependency dropped.
make[3]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
[ 95%] Built target volk
make[3]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[3]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
[ 97%] Built target test_all
make[3]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[3]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
[100%] Built target volk_profile
make[2]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
make[1]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/gnuradio/volk'
Making all in include
make[1]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/include'
Making all in gnuhawk
make[2]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/include/gnuhawk'
make[3]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/include/gnuhawk'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/include/gnuhawk'
make[2]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/include/gnuhawk'
make[2]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/include'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/include'
make[1]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/include'
Making all in src
make[1]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/src'
make[2]: Entering directory `/home/wdjohns/Downloads/integration-gnuhawk/src'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DPACKAGE_NAME=\"gnuhawk\" -DPACKAGE_TARNAME=\"gnuhawk\" -DPACKAGE_VERSION=\"1.10.0\" -DPACKAGE_STRING=\"gnuhawk\ 1.10.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"gnuhawk\" -DVERSION=\"1.10.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_BOOST=1 -DHAVE_BOOST_THREAD=1 -DEXPECTED_VECTOR_IMPL=/\*\*/ -D__processor_unknown__ -D__linux__ -D__OSVERSION__=2 -DENABLE_EVENTS=1 -I/home/wdjohns/redhawk/core/include -I/home/wdjohns/redhawk/core/include/ossie -I/home/wdjohns/redhawk/core/share/idl -I../include/gnuhawk -I../include/gnuhawk/runtime -I../include/gnuhawk/gruel -I../include/gnuhawk/gnuradio/filter -I../include/gnuhawk/gnuradio/general -I../include/gnuhawk/gnuradio/gengen -I../include/gnuhawk/gnuradio/gruel -I../include/gnuhawk/gnuradio/runtime -I../include/gnuhawk/gnuradio -I../gnuradio/volk/include -I../include/gnuhawk/gnuradio/reed-solomon -I../include/gnuhawk/gnuradio/hier -I../include/gnuhawk/gnuradio/io -I../include/gnuhawk/gnuradio/runtime -I../include/gnuhawk/gnuradio/viterbi -I../include/gnuhawk/gnuradio/gr-atsc -I../include/gnuhawk/gnuradio/gr-audio -I../include/gnuhawk/gnuradio/gr-audio/alsa -I../include/gnuhawk/gnuradio/gr-digital -I../include/gnuhawk/gnuradio/gr-fcd -I../include/gnuhawk/gnuradio/gr-fft -I../include/gnuhawk/gnuradio/gr-filter -I../include/gnuhawk/gnuradio/gr-howto-write-a-block -I../include/gnuhawk/gnuradio/gr-noaa -I../include/gnuhawk/gnuradio/gr-pager -I../include/gnuhawk/gnuradio/gr-trellis -I../include/gnuhawk/gnuradio/gr-vocoder -I../include/gnuhawk/gnuradio/gr-wavelet -UPACKAGE_NAME -UPACKAGE_BUGREPORT -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_VERSION -pthread -I/usr/include -msse2 -g -O2 -Wall -Wno-strict-aliasing -MT gr_basic_block.lo -MD -MP -MF .deps/gr_basic_block.Tpo -c -o gr_basic_block.lo gr_basic_block.cc
libtool: compile: g++ -DPACKAGE_NAME=\"gnuhawk\" -DPACKAGE_TARNAME=\"gnuhawk\" -DPACKAGE_VERSION=\"1.10.0\" "-DPACKAGE_STRING=\"gnuhawk 1.10.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"gnuhawk\" -DVERSION=\"1.10.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_BOOST=1 -DHAVE_BOOST_THREAD=1 "-DEXPECTED_VECTOR_IMPL=/**/" -D__processor_unknown__ -D__linux__ -D__OSVERSION__=2 -DENABLE_EVENTS=1 -I/home/wdjohns/redhawk/core/include -I/home/wdjohns/redhawk/core/include/ossie -I/home/wdjohns/redhawk/core/share/idl -I../include/gnuhawk -I../include/gnuhawk/runtime -I../include/gnuhawk/gruel -I../include/gnuhawk/gnuradio/filter -I../include/gnuhawk/gnuradio/general -I../include/gnuhawk/gnuradio/gengen -I../include/gnuhawk/gnuradio/gruel -I../include/gnuhawk/gnuradio/runtime -I../include/gnuhawk/gnuradio -I../gnuradio/volk/include -I../include/gnuhawk/gnuradio/reed-solomon -I../include/gnuhawk/gnuradio/hier -I../include/gnuhawk/gnuradio/io -I../include/gnuhawk/gnuradio/runtime -I../include/gnuhawk/gnuradio/viterbi -I../include/gnuhawk/gnuradio/gr-atsc -I../include/gnuhawk/gnuradio/gr-audio -I../include/gnuhawk/gnuradio/gr-audio/alsa -I../include/gnuhawk/gnuradio/gr-digital -I../include/gnuhawk/gnuradio/gr-fcd -I../include/gnuhawk/gnuradio/gr-fft -I../include/gnuhawk/gnuradio/gr-filter -I../include/gnuhawk/gnuradio/gr-howto-write-a-block -I../include/gnuhawk/gnuradio/gr-noaa -I../include/gnuhawk/gnuradio/gr-pager -I../include/gnuhawk/gnuradio/gr-trellis -I../include/gnuhawk/gnuradio/gr-vocoder -I../include/gnuhawk/gnuradio/gr-wavelet -UPACKAGE_NAME -UPACKAGE_BUGREPORT -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_VERSION -pthread -I/usr/include -msse2 -g -O2 -Wall -Wno-strict-aliasing -MT gr_basic_block.lo -MD -MP -MF .deps/gr_basic_block.Tpo -c gr_basic_block.cc -fPIC -DPIC -o .libs/gr_basic_block.o
In file included from ../include/gnuhawk/gruel/msg_accepter.h:27,
from ../include/gnuhawk/gr_msg_accepter.h:26,
from ../include/gnuhawk/gr_basic_block.h:30,
from gr_basic_block.cc:27:
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:125: error: ISO C++ forbids declaration of ‘Consumer_i’ with no type
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:125: error: expected ‘;’ before ‘*’ token
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:140: error: ‘Consumer_i’ was not declared in this scope
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:140: error: template argument 2 is invalid
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:140: error: template argument 4 is invalid
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:143: error: ISO C++ forbids declaration of ‘SupplierAdmin_i’ with no type
/home/wdjohns/redhawk/core/include/ossie/MessageInterface.h:143: error: expected ‘;’ before ‘*’ token
In file included from ../include/gnuhawk/gnuhawk.h:26,
from ../include/gnuhawk/gr_msg_accepter.h:27,
from ../include/gnuhawk/gr_basic_block.h:30,
from gr_basic_block.cc:27:
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]’:
../include/gnuhawk/gr_properties.h:412: error: cannot allocate an object of abstract type ‘GR_StringProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_StringProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = bool]’:
../include/gnuhawk/gr_properties.h:419: error: cannot allocate an object of abstract type ‘GR_BooleanProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_BooleanProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = char]’:
../include/gnuhawk/gr_properties.h:426: error: cannot allocate an object of abstract type ‘GR_CharProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_CharProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = unsigned char]’:
../include/gnuhawk/gr_properties.h:433: error: cannot allocate an object of abstract type ‘GR_OctetProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_OctetProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = short int]’:
../include/gnuhawk/gr_properties.h:440: error: cannot allocate an object of abstract type ‘GR_ShortProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_ShortProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = short unsigned int]’:
../include/gnuhawk/gr_properties.h:447: error: cannot allocate an object of abstract type ‘GR_UShortProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_UShortProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = int]’:
../include/gnuhawk/gr_properties.h:454: error: cannot allocate an object of abstract type ‘GR_LongProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_LongProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = unsigned int]’:
../include/gnuhawk/gr_properties.h:461: error: cannot allocate an object of abstract type ‘GR_ULongProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_ULongProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = float]’:
../include/gnuhawk/gr_properties.h:468: error: cannot allocate an object of abstract type ‘GR_FloatProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_FloatProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(T&) [with T = double]’:
../include/gnuhawk/gr_properties.h:475: error: cannot allocate an object of abstract type ‘GR_DoubleProperty’
../include/gnuhawk/gr_properties.h:263: note: because the following virtual functions are pure within ‘GR_DoubleProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]’:
../include/gnuhawk/gr_properties.h:483: error: cannot allocate an object of abstract type ‘GR_StringSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_StringSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = bool]’:
../include/gnuhawk/gr_properties.h:490: error: cannot allocate an object of abstract type ‘GR_BooleanSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_BooleanSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = char]’:
../include/gnuhawk/gr_properties.h:497: error: cannot allocate an object of abstract type ‘GR_CharSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_CharSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = unsigned char]’:
../include/gnuhawk/gr_properties.h:504: error: cannot allocate an object of abstract type ‘GR_OctetSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_OctetSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = short int]’:
../include/gnuhawk/gr_properties.h:511: error: cannot allocate an object of abstract type ‘GR_ShortSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_ShortSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = short unsigned int]’:
../include/gnuhawk/gr_properties.h:518: error: cannot allocate an object of abstract type ‘GR_UShortSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_UShortSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = int]’:
../include/gnuhawk/gr_properties.h:525: error: cannot allocate an object of abstract type ‘GR_LongSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_LongSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = unsigned int]’:
../include/gnuhawk/gr_properties.h:532: error: cannot allocate an object of abstract type ‘GR_ULongSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_ULongSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = long int]’:
../include/gnuhawk/gr_properties.h:539: error: cannot allocate an object of abstract type ‘GR_LongLongSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_LongLongSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = long unsigned int]’:
../include/gnuhawk/gr_properties.h:546: error: cannot allocate an object of abstract type ‘GR_ULongLongSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_ULongLongSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = float]’:
../include/gnuhawk/gr_properties.h:553: error: cannot allocate an object of abstract type ‘GR_FloatSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_FloatSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = double]’:
../include/gnuhawk/gr_properties.h:560: error: cannot allocate an object of abstract type ‘GR_DoubleSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_DoubleSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
../include/gnuhawk/gr_properties.h: In static member function ‘static PropertyInterface* GR_PropertyWrapperFactory::Create(std::vector<T, std::allocator<_Tp1> >&) [with T = std::complex<float>]’:
../include/gnuhawk/gr_properties.h:568: error: cannot allocate an object of abstract type ‘GR_ComplexFloatSeqProperty’
../include/gnuhawk/gr_properties.h:31: note: because the following virtual functions are pure within ‘GR_ComplexFloatSeqProperty’:
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:84: note: virtual void PropertyInterface::setValue(const CORBA::Any&, bool)
/home/wdjohns/redhawk/core/include/ossie/PropertyInterface.h:121: note: virtual bool PropertyInterface::matchesAddress(const void*)
make[2]: *** [gr_basic_block.lo] Error 1
make[2]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wdjohns/Downloads/integration-gnuhawk/src'
make: *** [all-recursive] Error 1

I think you already answered the question. GNU Hawk includes a copy of GNU Radio 3.6.2, this was released in 2012. From a quick look at the messages, I suspect many of the compile errors are due to gcc becoming stricter every new release. All of these issues have been fixed in newer gnuradios.
Basically, someone needs to remove the old gnuradio from the gnuhawk source tree, and update gnuhawk to work with current gnuradio versions. That would lead to a supportable gnuhawk.

Related

Namespace and clases nesting issue

I am trying to encapsulate a sprite based game and I have having trouble accesing classes withing the same namespace.
Here is the code for the namespace:
namespace Client
{
public class Bomb : public Entity
{
private:
int tiempo;
TipoBomba tipo;
public:
Bomb(int px, int py, int tiempo, TipoBomba tipo);
int getX();
int getY();
int getTiempo();
void setTiempo(int t);
Client::TipoBomba getTipo();
void reducirTiempo();
void Mostrar(Graphics ^ gr);
void explotar(Graphics ^ gr);
};
public class Game
{
int nivel;
LivingEntity* objJugador;
//Enemigo* objEnemigo;
public:
~Game(void);
Game(void);
static int ** matriz;
static std::vector<Bomb*> bombas;
static bool isBloque(int px, int py);
static bool isVacio(int px, int py);
static void romperBloque(int px, int py, Graphics^ gr);
static bool isRompible(int px, int py);
static bool isBomba(int px, int py);
Point getPrimeraPosicionJugador();
static void addBomba(Bomb* b);
static void cargarMatriz();
void setDireccion_Jugador(Direccion dir);
void Crear_Enemigo(int px, int py);
void Crear_Jugador(int px, int py);
void Mover_Entidades(Graphics^ gr);
Client::Player* getJugador();
int getNivel();
void setNivel(int n);
};
public class Player : public LivingEntity
{
int vidas;
int bombas;
public:
Player(void);
Player(int px, int py);
void Mostrar(Graphics^ gr);
void Mover(Graphics^ gr);
int getVidas();
int getBombas();
void setBombas(int bombas);
void setVidas(int vidas);
};
public class Enemy : public LivingEntity
{
public:
~Enemy(void);
Enemy(void);
Enemy(int px, int py);
void Mover(Graphics^ gr);
void Mostrar(Graphics^ gr);
};
public enum TipoBomba
{
BASICA,
GRANDE
};
}
The warnings are:
Warning 60 warning C4183: 'getJugador': missing return type; assumed to be a member function returning 'int'
Warning 37 warning C4183: 'getTipo': missing return type; assumed to be a member function returning 'int'
And the errors are:
Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I tried changing from Client::Player to just Player (same with TipoBomba) and it didn't work. I also tried putting public before classes and still the same. Is there any kind of keyword I need to use or is it just namespace semantics?.Thanks
EDIT:
Everything worked, whoever now I am getting a lot of LINKER errors when compiling. Examples:
Error 10 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 26 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 42 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 58 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 2 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 18 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 34 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 50 error LNK2005: "public: __thiscall Entity::Entity(int,int,char *,int,int)" (??0Entity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 13 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 29 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 45 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 61 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##$$FQAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 5 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 21 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 37 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 53 error LNK2005: "public: __thiscall LivingEntity::LivingEntity(int,int,char *,int,int)" (??0LivingEntity##QAE#HHPADHH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 14 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##$$FQAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 30 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##$$FQAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 46 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##$$FQAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 62 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##$$FQAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 6 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##QAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 22 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##QAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 38 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##QAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 54 error LNK2005: "public: enum Direccion __thiscall LivingEntity::getMovimiento(void)" (?getMovimiento#LivingEntity##QAE?AW4Direccion##XZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 11 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 27 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 43 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 59 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 3 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 19 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 35 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 51 error LNK2005: "public: int __thiscall Entity::getX(void)" (?getX#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 12 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 28 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 44 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 60 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##$$FQAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 4 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 20 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 36 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 52 error LNK2005: "public: int __thiscall Entity::getY(void)" (?getY#Entity##QAEHXZ) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 15 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 31 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 47 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 63 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 7 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 23 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 39 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 55 error LNK2005: "public: void __thiscall LivingEntity::setDx(int)" (?setDx#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 16 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 32 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 48 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 64 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##$$FQAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 8 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 24 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 40 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 56 error LNK2005: "public: void __thiscall LivingEntity::setDy(int)" (?setDy#LivingEntity##QAEXH#Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 17 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##$$FQAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 33 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##$$FQAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 49 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##$$FQAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 65 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##$$FQAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 9 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##QAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Enemy.obj BombermanUPC
Error 25 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##QAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 41 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##QAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 57 error LNK2005: "public: void __thiscall LivingEntity::setMovimiento(enum Direccion)" (?setMovimiento#LivingEntity##QAEXW4Direccion###Z) already defined in Bomb.obj C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Player.obj BombermanUPC
Error 69 error LNK2019: unresolved external symbol "public: int __thiscall Client::Bomb::getX(void)" (?getX#Bomb#Client##$$FQAEHXZ) referenced in function "public: static bool __cdecl Client::Game::isBomba(int,int)" (?isBomba#Game#Client##$$FSA_NHH#Z) C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 70 error LNK2019: unresolved external symbol "public: int __thiscall Client::Bomb::getY(void)" (?getY#Bomb#Client##$$FQAEHXZ) referenced in function "public: static bool __cdecl Client::Game::isBomba(int,int)" (?isBomba#Game#Client##$$FSA_NHH#Z) C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 71 error LNK2019: unresolved external symbol "public: static void __cdecl Client::Game::addBomba(class Client::Bomb *)" (?addBomba#Game#Client##$$FSAXPAVBomb#2##Z) referenced in function "private: void __clrcall BombermanUPC::MyForm::Key_Press(class System::Object ^,class System::Windows::Forms::KeyEventArgs ^)" (?Key_Press#MyForm#BombermanUPC##$$FA$AAMXP$AAVObject#System##P$AAVKeyEventArgs#Forms#Windows#4##Z) C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 68 error LNK2028: unresolved token (0A000107) "public: static void __cdecl Client::Game::addBomba(class Client::Bomb *)" (?addBomba#Game#Client##$$FSAXPAVBomb#2##Z) referenced in function "private: void __clrcall BombermanUPC::MyForm::Key_Press(class System::Object ^,class System::Windows::Forms::KeyEventArgs ^)" (?Key_Press#MyForm#BombermanUPC##$$FA$AAMXP$AAVObject#System##P$AAVKeyEventArgs#Forms#Windows#4##Z) C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\MyForm.obj BombermanUPC
Error 66 error LNK2028: unresolved token (0A00047F) "public: int __thiscall Client::Bomb::getX(void)" (?getX#Bomb#Client##$$FQAEHXZ) referenced in function "public: static bool __cdecl Client::Game::isBomba(int,int)" (?isBomba#Game#Client##$$FSA_NHH#Z) C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
Error 67 error LNK2028: unresolved token (0A000480) "public: int __thiscall Client::Bomb::getY(void)" (?getY#Bomb#Client##$$FQAEHXZ) referenced in function "public: static bool __cdecl Client::Game::isBomba(int,int)" (?isBomba#Game#Client##$$FSA_NHH#Z) C:\Users\Martin\documents\visual studio 2013\Projects\BombermanUPC\BombermanUPC\Game.obj BombermanUPC
The C++ compiler evaluates things line-by-line. (That's an oversimplification, but close enough for this discussion.) When it gets to the line that declares getJugador, it knows nothing about the Client::Player type, because it hasn't gotten there yet!
There's a couple ways to fix this:
You can add forward declarations of your classes. public class Player : public LivingEntity; tells the compiler "there is a class named Player, which I will declare the contents of later".
You can re-arrange your class definitions so that they're in order. Any reference to another type is to a type earlier in the file.
(Recommended) Separate your classes into their own header files. #include any other class definitions needed. As long as you don't have any circular references, this will take care of it.
Other things:
Since you have parameters of type Graphics^, it's obvious that you are using C++/CLI here. Given that, I highly highly recommend that you make your classes managed ones. Define the classes as public ref class, and always declare variables and parameters as MyClass^.
In general, when writing C++/CLI, I recommend doing things in the manner of the higher-level language, i.e., C#. So managed classes like I said, and use the .Net library rather than the C++ one.

Xamarin SKPaymentQueue AddPayment throwing exception

In my Xamarin app when I call this method
private void MakePayment (SKProduct product)
{
SKPayment payment = SKPayment.PaymentWithProduct (product);
SKPaymentQueue.DefaultQueue.AddPayment (payment);
}
I get this error:
Failed to marshal the Objective-C object 0x14607110 (type:
SKPaymentTransaction). Could not find an existing managed instance for
this object, nor was it possible to create a new managed instance
(because the type 'MonoTouch.StoreKit.SKPaymentTransaction[]' does not
have a constructor that takes one IntPtr argument).
I'm not sure if I have something configured wrong or there is an issue in my code or Xamarin.
Here's the code for the Observer
internal class CustomPaymentObserver : SKPaymentTransactionObserver
{
private InAppPurchase inAppPurchase;
public CustomPaymentObserver (InAppPurchase inAppPurchase)
{
this.inAppPurchase = inAppPurchase;
}
public override void UpdatedTransactions (SKPaymentQueue queue, SKPaymentTransaction[] transactions)
{
Console.WriteLine ("UpdatedTransactions");
foreach (SKPaymentTransaction transaction in transactions) {
switch (transaction.TransactionState) {
case SKPaymentTransactionState.Purchased:
inAppPurchase.CompleteTransaction (transaction);
break;
case SKPaymentTransactionState.Failed:
inAppPurchase.FailedTransaction (transaction);
break;
default:
break;
}
}
}
public override void PaymentQueueRestoreCompletedTransactionsFinished (SKPaymentQueue queue)
{
}
public override void RestoreCompletedTransactionsFailedWithError (SKPaymentQueue queue, NSError error)
{
}
}
Here is the full stack trace:
System.Exception: Failed to marshal the Objective-C object 0x17ecb680 (type: SKPaymentTransaction). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'MonoTouch.StoreKit.SKPaymentTransaction[]' does not have a constructor that takes one IntPtr argument).
at MonoTouch.ObjCRuntime.Runtime.MissingCtor (IntPtr ptr, IntPtr klass, System.Type type, MissingCtorResolution resolution) [0x00046] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pp-Runtime.cs:352
at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject[NSObject] (IntPtr ptr, System.Type type, MissingCtorResolution missingCtorResolution) [0x00000] in :0
at MonoTouch.ObjCRuntime.Runtime.GetNSObject (IntPtr ptr, System.Type target_type, MissingCtorResolution missingCtorResolution, System.Boolean& created) [0x00073] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pp-Runtime.cs:514
at MonoTouch.ObjCRuntime.Runtime.GetNSObjectWrapped (IntPtr ptr, IntPtr type_ptr, System.Boolean& created) [0x0000c] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pp-Runtime.cs:686
at at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:GetNSObjectWrapped (intptr,intptr,int&)
at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend_IntPtr (intptr,intptr,intptr)
at MonoTouch.StoreKit.SKPaymentQueue.AddPayment (MonoTouch.StoreKit.SKPayment payment) [0x00014] in /Developer/MonoTouch/Source/monotouch/src/StoreKit/.pp-SKPaymentQueue.g.cs:109
at IOS.Util.IAP.InAppPurchase.ReceivedResponse (MonoTouch.StoreKit.SKProductsRequest request, MonoTouch.StoreKit.SKProductsResponse response) [0x0001d] in /Users/aaron/Projects/budget-ease-xamarin/IOS/Util/IAP/InAppPurchase.cs:43
at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIApplication.cs:38
at IOS.Application.Main (System.String[] args) [0x00008] in /Users/aaron/Projects/budget-ease-xamarin/IOS/Main.cs:16
What's happened here is that the C# instance of your CustomPaymentObserver got garbage collected, while it's native ("Objective-C") counterpart lived on. When a notification was finally delivered, the native object tried to call into the now dead C# object and crashed your App.
To circumvent this, keep a reference to your CustomPaymentObserver e.g. in your AppDelegate to keep it alive.
I'm not sure this is documented somewhere for Xamarin.iOS (couldn't find something on a quick look), but I believe very similar for Xamarin.Droid (e.g. http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/)
I'm not really sure what was causing this. I thought it was perhaps something related to the linker. But I uninstalled Xamarin completely from my Mac (including all the MonoTouch stuff) and reinstalled everything and now it's working.

How to Fix Visual Studio 2012 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string?

How to fix a Visual Studio 2012 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string?
I've been compiling a solution containing one exe and several static lib projects
on which the exe depends fine with Visual Studio 2008. The static libs include:
TCL: tcl84tsx.lib
wxWidgets: wxbase.lib
zlib.lib
ws2_32.lib
xerces-c_2.lib
SNMP Research EMANATE: subagent.lib,agent.lib,emanate.lib,pack.lib,mibtable.lib,devkit.lib
etc.
I loaded the solution into Visual Studio 2012 and have compiled all the projects in the solution but when I try to link the exe, I'm getting errors about unresolved symbols for stuff in the standard C++ library like the output below.
I've found lots of people with unresolved symbols like this one but none of the fixes are working for me. Fixes I've tried so far include
Updating the EXE project by manually adding references to static lib projects on which the exe project depends
Toggling the "treat wchar_t as built-in type" linker option
Output from Visual Studio 2012 linker...
1>ace_funcs.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>ComponentX-Win32.lib(MyOrgConsoleSktServer.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentY-Win32.lib(ORBSingleton.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentY-Win32.lib(OrbException.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentZ-Win32.lib(ExceptionHelper.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentZ-Win32.lib(ComponentCCheckpointImpl.obj) : warning LNK4217: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error#std##QAE#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##1##Z)
1>ComponentX-Win32.lib(MyOrgConsole.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentX-Win32.lib(MyOrgThreadFactory.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentZ-Win32.lib(PersistenceServiceProxy.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentZ-Win32.lib(ComponentBServiceImpl.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentZ-Win32.lib(XmlPreferencesHelper.obj) : warning LNK4217: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "private: void __thiscall _CORBA_Sequence_String::copybuffer(unsigned long)" (?copybuffer#_CORBA_Sequence_String##AAEXK#Z)
1>ComponentZ-Win32.lib(XmlHelper.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentA-Win32.lib(ServiceBootstrap.obj) : warning LNK4217: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error#std##QAE#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##1##Z)
1>ComponentA-Win32.lib(propertyutil.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentA-Win32.lib(SystemEnvironment.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentZ-Win32.lib(PersistenceClient.obj) : warning LNK4049: locally defined symbol ??0?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#ABV01##Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported
1>ComponentY-Win32.lib(OrbException.obj) : warning LNK4049: locally defined symbol ??1?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>ComponentX-Win32.lib(MyOrgConsole.obj) : warning LNK4049: locally defined symbol ??1?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>ComponentX-Win32.lib(MyOrgThreadFactory.obj) : warning LNK4049: locally defined symbol ??1?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>ComponentX-Win32.lib(MyOrgConsoleSktServer.obj) : warning LNK4049: locally defined symbol ??1?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>ComponentY-Win32.lib(ORBSingleton.obj) : warning LNK4217: locally defined symbol ??1?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "public: virtual __thiscall OrbException::~OrbException(void)" (??1OrbException##UAE#XZ)
1>ComponentZ-Win32.lib(XmlPreferencesHelper.obj) : warning LNK4049: locally defined symbol ??1?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAE#XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
-- snip --
1>ComponentA-Win32.lib(ServiceBootstrap.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::substr(unsigned int,unsigned int)const " (__imp_?substr#?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QBE?AV12#II#Z) referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall ServiceBootstrap::trimmed(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (?trimmed#ServiceBootstrap##AAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABV23#PBD#Z)
1>ComponentA-Win32.lib(ServiceBootstrap.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::find_last_not_of(char const *,unsigned int,unsigned int)const " (__imp_?find_last_not_of#?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QBEIPBDII#Z) referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall ServiceBootstrap::trimmed(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (?trimmed#ServiceBootstrap##AAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABV23#PBD#Z)
1>ComponentA-Win32.lib(ServiceBootstrap.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::find_first_not_of(char const *,unsigned int,unsigned int)const " (__imp_?find_first_not_of#?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QBEIPBDII#Z) referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall ServiceBootstrap::trimmed(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (?trimmed#ServiceBootstrap##AAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABV23#PBD#Z)
1>ComponentA-Win32.lib(ServiceBootstrap.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits#D#std##V?$allocator#D#1##std##YA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##0#ABV10#PBD#Z) referenced in function "private: void __thiscall ServiceBootstrap::verifyBootstrapProperties(void)" (?verifyBootstrapProperties#ServiceBootstrap##AAEXXZ)
1>ComponentZ-Win32.lib(PersistenceServiceProxy.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits#D#std##V?$allocator#D#1##std##YA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##0#ABV10#PBD#Z)
1>ComponentA-Win32.lib(ServiceBootstrap.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits#D#std##V?$allocator#D#1##std##YA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##0#ABV10#0#Z) referenced in function "public: class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > __thiscall ServiceBootstrap::getBootstrapProperties(void)" (?getBootstrapProperties#ServiceBootstrap##QAE?AV?$map#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##V12#U?$less#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###2#V?$allocator#U?$pair#$$CBV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##V12##std###2##std##XZ)
1>ComponentZ-Win32.lib(PersistenceServiceProxy.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits#D#std##V?$allocator#D#1##std##YA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##0#ABV10#0#Z)
1>ComponentA-Win32.lib(propertyutil.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Mutex::_Lock(void)" (__imp_?_Lock#_Mutex#std##QAEXXZ) referenced in function "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Sentry_base::_Sentry_base(class std::basic_ostream<char,struct std::char_traits<char> > &)" (??0_Sentry_base#?$basic_ostream#DU?$char_traits#D#std###std##QAE#AAV12##Z)
1>ComponentZ-Win32.lib(XmlHelper.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Mutex::_Lock(void)" (__imp_?_Lock#_Mutex#std##QAEXXZ)
-- snip --
1>.\Debug/sComponentC.exe : fatal error LNK1120: 22 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
In properties->c/c++->Laguage, I set treat wchar_t as built in type to No and it solved my problem.
If you have already tried below options:
Updating the EXE project by manually adding references to static lib projects on which the exe project depends
Toggling the "treat wchar_t as built-in type" option
Try configuring your project to x64 by following steps:
Right click on Solution 'ProjectName'
Select Configuration Manager...
Change the platform of the project which you are trying to link .lib file to x64 from Win32 (or vise versa)
Rebuild the solution
This actually resolved my problem. I wasn't aware if my external lib is compiled for 32-bit or 64-bit.
Even I faced this type of errors in visual studio. The reason for these kind of errors are,
1) You might have included multiple libraries which are conflicting each other.
Sometimes,one class in a library can conflict other class in other library.
2) You might have included libraries from directories. Check the path of the libraries once again.
3) You need to specify libraries and header files (if you have to include) in the project properties. Check once again whether the paths are correct.

Selector invoked from objective-c on a managed object that has been GC'ed, how to avoid viewcontrollers from being GC'd

We have an app in the appstore that works without any issues on iPhone 4g/4gs but when I tested it on an iPod I got a surprise because it crashes all the time at "random" places. Looking at the strack traces it seems my viewcontrollers have been GC'ed.
Will the viewcontroller be garbagecollected if I write methods like this:
public void PushShowTeamController (Object a)
{
var teamController = new TeamController (a);
NavigationController.PushViewController (teamController, true);
}
Because the iPod suddently throws an error like this:
Jan 6 18:52:09 unknown MyApp[5197] <Warning>: Received memory warning.
Jan 6 18:52:10 unknown UIKitApplication:mypackage.app[0x9db2][5197] <Notice>: Unhandled Exception: System.Exception: Selector invoked from objective-c on a managed object that has been GC'ed ---> System.MissingMethodException: No constructor found for MyApp.TeamController::.ctor(System.IntPtr)
Jan 6 18:52:10 unknown UIKitApplication:mypackage.app[0x9db2][5197] <Notice>: at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
Jan 6 18:52:10 unknown UIKitApplication:mypackage.app[0x9db2][5197] <Notice>: at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
Jan 6 18:52:10 unknown UIKitApplication:mypackage.app[0x9db2][5197] <Notice>: at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0
Jan 6 18:52:10 unknown UIKitApplication:mypackage.app[0x9db2][5197] <Notice>: at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x00000] in <filename unknown>:0
Jan 6 18:52:10 unknown UIKitApplication:mypackage.app[0x9db2][5197] <Notice>: --- End of inner exception stack trace ---
This will happen when an managed object is disposed (when no reference is left to an instance) and the object is later resurfaced by native code.
You need to ensure that a reference to MyApp.TeamController is kept in managed code as long as it can be required (e.g. accessed) by native code.
In most case MonoTouch will ensure a reference is kept. Your code:
NavigationController.PushViewController (teamController, true);
is correct and UINavigationController will keep a reference to your teamController. However if you call PushViewController on another controller then the first reference will be overwritten and will be collectable by the garbage collector (GC). This situation would lead to the exception you are seeing.
Note: because you can't predict when the GC will collect unreferenced object instance the exception will appear to be thrown randomly.
From my experience this happens when i use a lot of dispose() on managed objects instead of setting them to null and leaving the GC to do its job. Also anonymous delegates combined with dispose() can lead to such problems

No constructor found for ViewController::.ctor(System.IntPtr)

I'm having an issue where my Monotouch application sometimes crashes just after receiving a memory warning. Please see that stack trace below.
Received memory warning. Level=2
DTMobileIS[2299] : _memoryNotification : {
OSMemoryNotificationLevel = 2;
timestamp = "2011-04-11 14:29:09 +0000";
}
Toplevel exception: System.MissingMethodException: No constructor found for Myapp.UI.BoardController::.ctor(System.IntPtr)
at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in :0
at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x00000] in :0
at MonoTouch.ObjCRuntime.Runtime.GetNSObject (IntPtr ptr) [0x00000] in :0
at MonoTouch.ObjCRuntime.Runtime.GetNSObjectWrapped (IntPtr ptr) [0x00000] in :0
at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:GetNSObjectWrapped (intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in :0
at Myapp.Free.Application.Main (System.String[] args) [0x00000] in /Users/haakon/Code/Myapp-work/iOS/Myapp.Free/Myapp.Free/Main.cs:12
The stack trace is correct in that the indicated class (BoardController, which is a UIViewController subclass) lacks a constructor taking a IntPtr parameter. But this is intentional as I don't use Interface Builder at all in my application. So why does this happen?
I did find a similar question that seemed to suggest that this can happen if you allow your views (or possibly view controllers) to become garbage collected. But I don't see how this can happen here. Some background: My application delegate holds a strong reference to a navigation controller, which in turn holds a strong reference to the root view controller in the navigation stack. This root view controller also holds a strong reference to the BoardController instance. So I don't understand how it's possible that BoardController gets garbage collected.
Any ideas?
The IntPtr constructor is used when a native object needs to be surfaced to a managed object. In this particular case, you could be creating, like this:
var foo = new Foo ();
SomeObject.Property = foo;
This assigns the Foo object to the property, but if the Property is an Objective-C object, if you do not keep a reference to "foo", then Mono's GC will go ahead and dispose the linkage between the managed Foo and the unmanaged Foo.
Then, later on, you try to retrieve it:
var bar = SomeObject.Property;
Here, MonoTouch will know that there is no managed object anymore than maps to it, so it has to construct a new one, but all it has is the IntPtr to the Objective-C code. This is why you need the constructor.
You might be tempted to just add the native constructor, and this is fine in many cases, but it is a problem if your object has its own state stored in the managed world, for example:
public class Foo : UIView {
string Name;
public Foo () { Name= "Hello"; }
public Foo (IntPtr ptr) : base (ptr) {}
}
In this case, the IntPtr constructor can not completely reconstruct the managed object and its state merely from the IntPtr. So the likely source of your problem is that you are not keeping a reference to your object.
So the real fix in short is: keep a reference to your BoardController in your managed code to prevent the object from being collected when you are still going to use it later on.

Resources