Jump to content
  • Advertisement
Sign in to follow this  
SyncCarryOn

Help setting up a library (alguichan)

This topic is 2589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I've decided to learn game development and decided to start learning allegro. Meanwhile I discovered that the alguichan library (http://sourceforge.n...ects/alguichan/) was specifically build around allegro, and so decided to try it out. Unfortunately I'm getting errors when trying to run the allegro5 example (I have allegro 5.0.4);

[spoiler]

#include "allegro5/allegro.h"
#include "allegro5/allegro_font.h"
#include "allegro5/allegro_image.h"
#include "allegro5/allegro_primitives.h"

#include "alguichan.hpp"
#include "al5gcn.hpp"



/*
* List boxes and drop downs need an instance of a list model
* in order to display a list.
*/
class DemoListModel : public gcn::ListModel
{
public:
int getNumberOfElements()
{
return 5;
}

std::string getElementAt(int i)
{
switch(i)
{
case 0:
return std::string("zero");
case 1:
return std::string("one");
case 2:
return std::string("two");
case 3:
return std::string("three");
case 4:
return std::string("four");
default: // Just to keep warnings away
return std::string("");
}
}
};

DemoListModel demoListModel;



int main(int argc, char **argv)
{
// init allegro
al_init();
al_install_keyboard();
al_install_mouse();

al_init_font_addon();
al_init_image_addon();
al_init_primitives_addon();

// create display
al_set_new_display_flags(ALLEGRO_WINDOWED);
ALLEGRO_DISPLAY* p_display = al_create_display(640, 480);

// init guichan and backend
gcn::Allegro5ImageLoader image_loader;
gcn::Image::setImageLoader(&image_loader);
gcn::Allegro5Input input;
gcn::Allegro5Graphics graphics;

gcn::Gui gui;
gui.setGraphics(&graphics);
gui.setInput(&input);

// setup font
gcn::ImageFont font("fixedfont.bmp", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
gcn::Widget::setGlobalFont(&font);

// now setup a few widgets
gcn::Container top;
gcn::Label label("Label");
gcn::Image* p_image = gcn::Image::load("gui-chan.bmp");
gcn::Icon icon(p_image);
gcn::Button button("Button");
gcn::TextField textField("TextField");
textField.setAlignment(gcn::Graphics::Center);
textField.setBackgroundColor(gcn::Color(200,100,100));
gcn::TextBox textBox("Multiline\nText box");
textBox.setBackgroundColor(gcn::Color(200,100,110));
gcn::ScrollArea textBoxScrollArea(&textBox);
textBoxScrollArea.setWidth(200);
textBoxScrollArea.setHeight(100);
gcn::ListBox listBox(&demoListModel);
listBox.setWidth(80);
gcn::DropDown dropDown(&demoListModel);
dropDown.setWidth(110);
gcn::CheckBox checkBox1("Checkbox 1");
gcn::CheckBox checkBox2("Checkbox 2");
gcn::RadioButton radioButton1("RadioButton 1", "radiogroup", true);
gcn::RadioButton radioButton2("RadioButton 2", "radiogroup");
gcn::RadioButton radioButton3("RadioButton 3", "radiogroup");
gcn::Slider slider(0, 10);
slider.setSize(100, 10);
gcn::Window window("I am a window Drag me");
window.setBaseColor(gcn::Color(255, 150, 200, 190));
gcn::Image* p_darkbitsImage = gcn::Image::load("darkbitslogo_by_haiko.bmp");
gcn::Icon darkbitsIcon(p_darkbitsImage);
window.add(&darkbitsIcon);
window.resizeToContent();
gcn::TabbedArea tabbedArea;
tabbedArea.setSize(200, 100);
gcn::Button tabOneButton("A button in tab 1");
tabbedArea.addTab("Tab 1", &tabOneButton);
tabOneButton.setPosition(6,6);
gcn::CheckBox tabTwoCheckBox("A check box in tab 2");
tabbedArea.addTab("Tab 2", &tabTwoCheckBox);
tabTwoCheckBox.setPosition(6,6);
gcn::ImageButton tab3ImageButton;
tab3ImageButton.setImage(p_image);
tab3ImageButton.adjustSize();
gcn::ScrollArea tab3ScrollArea;
tab3ScrollArea.setSize(160,60);
tab3ScrollArea.setContent(&tab3ImageButton);
tabbedArea.addTab("Tab 3", &tab3ScrollArea);
// add all widgets to the top container
top.add(&label, 10, 10);
top.add(&icon, 10, 30);
top.add(&button, 200, 10);
top.add(&textField, 250, 10);
top.add(&textBoxScrollArea, 200, 50);
top.add(&listBox, 200, 200);
top.add(&dropDown, 500, 10);
top.add(&checkBox1, 500, 130);
top.add(&checkBox2, 500, 150);
top.add(&radioButton1, 500, 200);
top.add(&radioButton2, 500, 220);
top.add(&radioButton3, 500, 240);
top.add(&slider, 500, 300);
top.add(&window, 50, 350);
top.add(&tabbedArea, 400, 350);
top.setSize(640, 480);
// and set the top container to be the top widget for the gui
gui.setTop(&top);

// now we need to setup allegro for a simple game loop
ALLEGRO_EVENT_QUEUE* p_eventQueue = al_create_event_queue();
al_register_event_source(p_eventQueue, al_get_keyboard_event_source());
al_register_event_source(p_eventQueue, al_get_mouse_event_source());
ALLEGRO_DISPLAY*const pdisplay = al_get_current_display();
al_register_event_source(p_eventQueue, al_get_display_event_source(pdisplay));
// timer gives 30 fps, we draw at every timer event
ALLEGRO_TIMER* p_timer = al_create_timer(1.0/30);
al_register_event_source(p_eventQueue, al_get_timer_event_source(p_timer));
al_start_timer(p_timer);

// this is a simple game loop, that assumes that both logic() and draw() below execute quite fast
while(true)
{
ALLEGRO_EVENT event;
al_wait_for_event(p_eventQueue, &event);
if(event.type == ALLEGRO_EVENT_DISPLAY_CLOSE)
break;
if(event.type < ALLEGRO_EVENT_TIMER)
{
// intercept ESC to quit the game loop
if(event.type == ALLEGRO_EVENT_KEY_DOWN)
if(event.keyboard.keycode == ALLEGRO_KEY_ESCAPE)
break;
input.pushInput(event);
continue;
}
if(event.type == ALLEGRO_EVENT_TIMER && event.timer.source == p_timer)
{
// Now we let the Gui object perform its logic.
gui.logic();
// Now we let the Gui object draw itself.
gui.draw();

al_flip_display();
}
}

// cleanup
al_destroy_timer(p_timer);
al_destroy_event_queue(p_eventQueue);
al_destroy_display(p_display);
delete p_darkbitsImage;
delete p_image;

return 0;
}

[/spoiler]

What I am getting is 108 unresolved externals, first of which is
1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Allegro5Input::~Allegro5Input(void)" (??1Allegro5Input@gcn@@UAE@XZ) referenced in function _main

These are all the errors:

[spoiler]1>------ Build started: Project: EmptyProject, Configuration: Debug Win32 ------

1>Build started 13.11.2011 ?. 23:08:28 ?..

1>InitializeBuildStatus:

1> Touching "Debug\EmptyProject.unsuccessfulbuild".

1>ClCompile:

1> al5_example.cpp

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Allegro5Input::~Allegro5Input(void)" (??1Allegro5Input@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Allegro5Graphics::~Allegro5Graphics(void)" (??1Allegro5Graphics@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Gui::~Gui(void)" (??1Gui@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::ImageFont::~ImageFont(void)" (??1ImageFont@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Container::~Container(void)" (??1Container@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::DropDown::~DropDown(void)" (??1DropDown@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::RadioButton::~RadioButton(void)" (??1RadioButton@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Window::~Window(void)" (??1Window@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Icon::~Icon(void)" (??1Icon@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::TabbedArea::~TabbedArea(void)" (??1TabbedArea@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::ScrollArea::~ScrollArea(void)" (??1ScrollArea@gcn@@UAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Gui::draw(void)" (?draw@Gui@gcn@@UAEXXZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Gui::logic(void)" (?logic@Gui@gcn@@UAEXXZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::Allegro5Input::pushInput(union ALLEGRO_EVENT &)" (?pushInput@Allegro5Input@gcn@@QAEXAATALLEGRO_EVENT@@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Gui::setTop(class gcn::Widget *)" (?setTop@Gui@gcn@@UAEXPAVWidget@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Container::add(class gcn::Widget *,int,int)" (?add@Container@gcn@@UAEXPAVWidget@2@HH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::ScrollArea::setContent(class gcn::Widget *)" (?setContent@ScrollArea@gcn@@QAEXPAVWidget@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::ScrollArea::ScrollArea(void)" (??0ScrollArea@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::ImageButton::adjustSize(void)" (?adjustSize@ImageButton@gcn@@QAEXXZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::ImageButton::setImage(class gcn::Image const *)" (?setImage@ImageButton@gcn@@QAEXPBVImage@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::ImageButton::ImageButton(void)" (??0ImageButton@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::Widget::setPosition(int,int)" (?setPosition@Widget@gcn@@QAEXHH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::TabbedArea::addTab(char const *,class gcn::Widget *)" (?addTab@TabbedArea@gcn@@QAEXPBDPAVWidget@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::TabbedArea::setSize(int,int)" (?setSize@TabbedArea@gcn@@UAEXHH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::TabbedArea::TabbedArea(void)" (??0TabbedArea@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Window::resizeToContent(void)" (?resizeToContent@Window@gcn@@UAEXXZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Container::add(class gcn::Widget *)" (?add@Container@gcn@@UAEXPAVWidget@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::Widget::setBaseColor(class gcn::Color const &)" (?setBaseColor@Widget@gcn@@QAEXABVColor@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Window::Window(char const *)" (??0Window@gcn@@QAE@PBD@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::Widget::setSize(int,int)" (?setSize@Widget@gcn@@QAEXHH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Slider::Slider(double,double)" (??0Slider@gcn@@QAE@NN@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::RadioButton::RadioButton(char const *,char const *,bool)" (??0RadioButton@gcn@@QAE@PBD0_N@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::CheckBox::CheckBox(char const *,bool)" (??0CheckBox@gcn@@QAE@PBD_N@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::DropDown::DropDown(class gcn::ListModel *,class gcn::ScrollArea *,class gcn::ListBox *)" (??0DropDown@gcn@@QAE@PAVListModel@1@PAVScrollArea@1@PAVListBox@1@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::Widget::setWidth(int)" (?setWidth@Widget@gcn@@QAEXH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::ListBox::ListBox(class gcn::ListModel *)" (??0ListBox@gcn@@QAE@PAVListModel@1@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::ScrollArea::setHeight(int)" (?setHeight@ScrollArea@gcn@@QAEXH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::ScrollArea::setWidth(int)" (?setWidth@ScrollArea@gcn@@QAEXH@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::ScrollArea::ScrollArea(class gcn::Widget *)" (??0ScrollArea@gcn@@QAE@PAVWidget@1@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::TextBox::TextBox(char const *)" (??0TextBox@gcn@@QAE@PBD@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::Widget::setBackgroundColor(class gcn::Color const &)" (?setBackgroundColor@Widget@gcn@@QAEXABVColor@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Color::Color(short,short,short,short)" (??0Color@gcn@@QAE@FFFF@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: void __thiscall gcn::TextField::setAlignment(enum gcn::Graphics::Alignment)" (?setAlignment@TextField@gcn@@QAEXW4Alignment@Graphics@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::TextField::TextField(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0TextField@gcn@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Button::Button(char const *)" (??0Button@gcn@@QAE@PBD@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Icon::Icon(class gcn::Image const *)" (??0Icon@gcn@@QAE@PBVImage@1@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: static class gcn::Image * __cdecl gcn::Image::load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?load@Image@gcn@@SAPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Label::Label(char const *)" (??0Label@gcn@@QAE@PBD@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Container::Container(void)" (??0Container@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: static void __cdecl gcn::Widget::setGlobalFont(class gcn::Font *)" (?setGlobalFont@Widget@gcn@@SAXPAVFont@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::ImageFont::ImageFont(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 &)" (??0ImageFont@gcn@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Gui::setInput(class gcn::Input *)" (?setInput@Gui@gcn@@UAEXPAVInput@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall gcn::Gui::setGraphics(class gcn::Graphics *)" (?setGraphics@Gui@gcn@@UAEXPAVGraphics@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Gui::Gui(void)" (??0Gui@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Allegro5Graphics::Allegro5Graphics(void)" (??0Allegro5Graphics@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: __thiscall gcn::Allegro5Input::Allegro5Input(void)" (??0Allegro5Input@gcn@@QAE@XZ) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: static void __cdecl gcn::Image::setImageLoader(class gcn::ImageLoader *)" (?setImageLoader@Image@gcn@@SAXPAVImageLoader@2@@Z) referenced in function _main

1>al5_example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall gcn::Widget::~Widget(void)" (??1Widget@gcn@@UAE@XZ) referenced in function "public: virtual __thiscall gcn::CheckBox::~CheckBox(void)" (??1CheckBox@gcn@@UAE@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::CheckBox::draw(class gcn::Graphics *)" (?draw@CheckBox@gcn@@UAEXPAVGraphics@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::drawFrame(class gcn::Graphics *)" (?drawFrame@Widget@gcn@@UAEXPAVGraphics@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::Widget * __thiscall gcn::Widget::getParent(void)const " (?getParent@Widget@gcn@@UBEPAV12@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::Widget * __thiscall gcn::Widget::getTop(void)const " (?getTop@Widget@gcn@@UBEPAV12@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall gcn::Widget::isFocused(void)const " (?isFocused@Widget@gcn@@UBE_NXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::requestFocus(void)" (?requestFocus@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::requestMoveToTop(void)" (?requestMoveToTop@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::requestMoveToBottom(void)" (?requestMoveToBottom@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::_setFocusHandler(class gcn::FocusHandler *)" (?_setFocusHandler@Widget@gcn@@UAEXPAVFocusHandler@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::FocusHandler * __thiscall gcn::Widget::_getFocusHandler(void)" (?_getFocusHandler@Widget@gcn@@UAEPAVFocusHandler@2@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::getAbsolutePosition(int &,int &)const " (?getAbsolutePosition@Widget@gcn@@UBEXAAH0@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::_setParent(class gcn::Widget *)" (?_setParent@Widget@gcn@@UAEXPAV12@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::requestModalFocus(void)" (?requestModalFocus@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::requestModalMouseInputFocus(void)" (?requestModalMouseInputFocus@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::releaseModalFocus(void)" (?releaseModalFocus@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::releaseModalMouseInputFocus(void)" (?releaseModalMouseInputFocus@Widget@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall gcn::Widget::isModalFocused(void)const " (?isModalFocused@Widget@gcn@@UBE_NXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall gcn::Widget::isModalMouseInputFocused(void)const " (?isModalMouseInputFocused@Widget@gcn@@UBE_NXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::Widget * __thiscall gcn::Widget::getWidgetAt(int,int)" (?getWidgetAt@Widget@gcn@@UAEPAV12@HH@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class std::list<class gcn::MouseListener *,class std::allocator<class gcn::MouseListener *> > const & __thiscall gcn::Widget::_getMouseListeners(void)" (?_getMouseListeners@Widget@gcn@@UAEABV?$list@PAVMouseListener@gcn@@V?$allocator@PAVMouseListener@gcn@@@std@@@std@@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class std::list<class gcn::KeyListener *,class std::allocator<class gcn::KeyListener *> > const & __thiscall gcn::Widget::_getKeyListeners(void)" (?_getKeyListeners@Widget@gcn@@UAEABV?$list@PAVKeyListener@gcn@@V?$allocator@PAVKeyListener@gcn@@@std@@@std@@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class std::list<class gcn::FocusListener *,class std::allocator<class gcn::FocusListener *> > const & __thiscall gcn::Widget::_getFocusListeners(void)" (?_getFocusListeners@Widget@gcn@@UAEABV?$list@PAVFocusListener@gcn@@V?$allocator@PAVFocusListener@gcn@@@std@@@std@@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::Rectangle __thiscall gcn::Widget::getChildrenArea(void)" (?getChildrenArea@Widget@gcn@@UAE?AVRectangle@2@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::FocusHandler * __thiscall gcn::Widget::_getInternalFocusHandler(void)" (?_getInternalFocusHandler@Widget@gcn@@UAEPAVFocusHandler@2@XZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Widget::showPart(class gcn::Rectangle)" (?showPart@Widget@gcn@@UAEXVRectangle@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall gcn::CheckBox::drawBox(class gcn::Graphics *)" (?drawBox@CheckBox@gcn@@MAEXPAVGraphics@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall gcn::CheckBox::toggleSelected(void)" (?toggleSelected@CheckBox@gcn@@MAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::CheckBox::mouseClicked(class gcn::MouseEvent &)" (?mouseClicked@CheckBox@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::CheckBox::mouseDragged(class gcn::MouseEvent &)" (?mouseDragged@CheckBox@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::CheckBox::keyPressed(class gcn::KeyEvent &)" (?keyPressed@CheckBox@gcn@@UAEXAAVKeyEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::draw(class gcn::Graphics *)" (?draw@ListBox@gcn@@UAEXPAVGraphics@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::logic(void)" (?logic@ListBox@gcn@@UAEXXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall gcn::ListBox::getRowHeight(void)const " (?getRowHeight@ListBox@gcn@@UBEIXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::mousePressed(class gcn::MouseEvent &)" (?mousePressed@ListBox@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::mouseWheelMovedUp(class gcn::MouseEvent &)" (?mouseWheelMovedUp@ListBox@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::mouseWheelMovedDown(class gcn::MouseEvent &)" (?mouseWheelMovedDown@ListBox@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::mouseDragged(class gcn::MouseEvent &)" (?mouseDragged@ListBox@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::ListBox::keyPressed(class gcn::KeyEvent &)" (?keyPressed@ListBox@gcn@@UAEXAAVKeyEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Slider::draw(class gcn::Graphics *)" (?draw@Slider@gcn@@UAEXPAVGraphics@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall gcn::Slider::drawMarker(class gcn::Graphics *)" (?drawMarker@Slider@gcn@@MAEXPAVGraphics@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual double __thiscall gcn::Slider::markerPositionToValue(int)const " (?markerPositionToValue@Slider@gcn@@MBENH@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall gcn::Slider::valueToMarkerPosition(double)const " (?valueToMarkerPosition@Slider@gcn@@MBEHN@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall gcn::Slider::getMarkerPosition(void)const " (?getMarkerPosition@Slider@gcn@@MBEHXZ)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Slider::mousePressed(class gcn::MouseEvent &)" (?mousePressed@Slider@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Slider::mouseWheelMovedUp(class gcn::MouseEvent &)" (?mouseWheelMovedUp@Slider@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Slider::mouseWheelMovedDown(class gcn::MouseEvent &)" (?mouseWheelMovedDown@Slider@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Slider::mouseDragged(class gcn::MouseEvent &)" (?mouseDragged@Slider@gcn@@UAEXAAVMouseEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall gcn::Slider::keyPressed(class gcn::KeyEvent &)" (?keyPressed@Slider@gcn@@UAEXAAVKeyEvent@2@@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "public: virtual class gcn::Image * __thiscall gcn::Allegro5ImageLoader::load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?load@Allegro5ImageLoader@gcn@@UAEPAVImage@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)

1>al5_example.obj : error LNK2001: unresolved external symbol "protected: virtual struct ALLEGRO_BITMAP * __thiscall gcn::Allegro5ImageLoader::loadBitmap(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadBitmap@Allegro5ImageLoader@gcn@@MAEPAUALLEGRO_BITMAP@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)

1>d:\Users\Cani\Documents\Visual Studio 2010\Projects\EmptyProject\EmptyProject\Debug\EmptyProject.exe : fatal error LNK1120: 108 unresolved externals

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:02.79

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/spoiler]
I have added the alguichan folder to the project's additional library directories and additional include directories and I'm stuck, seeing as I've never touched a custom library before a few hours ago unsure.gif.

[I'm using MSVC 10]

Share this post


Link to post
Share on other sites
Advertisement
Did you add the libraries themselves?

Right click your project->properties->Linker->Input->Additional Dependencies.

You need to add your .lib files to that list.

Share this post


Link to post
Share on other sites
There are no .lib files in the alguichan archive, for the allegro part I have done everything that I found should be done and it on its own works fine.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!