**** Build of configuration Default for project ITAWAS ****
make all
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -L. -LC:/pspsdk/psp/sdk/lib main.o graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lstdc++ -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
main.o: In function `main':
main.cpp:(.text+0x7c): undefined reference to `vtable for Shop'
main.cpp:(.text+0x84): undefined reference to `vtable for Shop'
collect2: ld returned 1 exit status
make: *** [hello.elf] Error 1
here is how i declared shop in main.c:
Code: Select all
Shop *shop;
shop = new Shop;
Code: Select all
#pragma once
#include <string>
#include <vector>
//#include "Player.h"
class Shop
{
public:
Image *BG;
Image *img;
int WIDTH;
int Y;
int X0;
int X1;
int X2;
int X3;
int X4;
bool firstPass;
int xCoordinates[5];
bool inventory[5][10];
int costs[5][10];
int arrowCoords[5][10];
int left;
int right;
int still;
int dir;
int current;
int dis;
int choice;
int selectedUpgrade;
int numUp;
std::string side;
//0 = image, 1 = stats
std::vector<Image*> shotgun;
std::vector<Image*> minigun;
std::vector<Image*> uzi;
std::vector<Image*> flamethrower;
std::vector<Image*> dragown;
std::vector<Image*> money;
Image *pointer;
Image *incr;
std::vector<std::vector<Image*>*> weapon;
std::vector<Image*> upgrades;
std::vector<Image*> display;
//Arrows 0,1 = Left 2,3 = Right
std::vector<Image*> arrow;
std::vector<Image*> fist;
std::vector<Image*> heart;
Shop();
//
virtual void draw();
//
virtual bool act(bool L, bool R, bool U, bool D, bool E, bool esc);
};
Code: Select all
#include "Shop.h"
Shop::Shop()
{
code
}
void Shop::draw()
{
code
}
bool Shop::act(bool L, bool R, bool U, bool D, bool E, bool esc)
{
code
}