Namespace and clases nesting issue - visual-c++

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.

Related

please help me i keep my appliction keep crashing when i open it [duplicate]

This question already has answers here:
What is a NullPointerException, and how do I fix it?
(12 answers)
Closed 4 years ago.
E/: Cannot load libgui-plugin
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ayushjain.myapplication33, PID: 24308
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ayushjain.myapplication33/com.example.ayushjain.myapplication33.Main2Activity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2911)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2989)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6753)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at com.example.ayushjain.myapplication33.Main2Activity.onCreate(Main2Activity.java:37)
at android.app.Activity.performCreate(Activity.java:7041)
at android.app.Activity.performCreate(Activity.java:7032)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1231)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2989) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6753) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
you did not instantiate your button before executing the Button.setOnClickListener so you can solve this way,
Button your_button = (Button) findViewById(R.id. your_button);
then add your click listener like below,
your_button.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
//do your stuff
});

Errors Building GNUHAWK with REDHAWK 2.0

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.

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

Monotouch - NSInvalidArgumentException

I've got this error:
2011-03-28 15:38:07.154 FolderNavigation[264:207] -[Subfolder _setViewDelegate:]: unrecognized selector sent to instance 0x6eaafd0
Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[Subfolder _setViewDelegate:]: unrecognized selector sent to instance 0x6eaafd0
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) [0x00038] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
at FolderNavigation.Application.Main (System.String[] args) [0x00000] in /Users/claudio/Projects/FolderNavigation/FolderNavigation/Main.cs:16
Error connecting stdout and stderr (127.0.0.1:10001)
and following de code using Debug(using Step Into)
Starting on Main.cs:
static void Main (string[] args)
{
UIApplication.Main (args);
}
Subfolder.xib.cs(next Step Into)
[Export("initWithCoder:")]
public Subfolder (NSCoder coder) : base(coder)
{
Initialize ();
}
void Initialize ()
{
}
and in the next step, I have got this error.
Does anybody have an idea?
Thanks in advance!
Is this a View or ViewController? My auto-generated files have a public Subfolder() : base("Subfolder", null) constructor, which I don't see here.
Also, which version of XCode & MT are you running?

Resources