Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i am getting this error when i run your code in ubuntu #3

Open
DaivikDave opened this issue Nov 14, 2017 · 1 comment
Open

i am getting this error when i run your code in ubuntu #3

DaivikDave opened this issue Nov 14, 2017 · 1 comment

Comments

@DaivikDave
Copy link

/tmp/ccojDm13.o:Main.cpp:(.text+0xd2): undefined reference to IniFile::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccojDm13.o:Main.cpp:(.text+0x3f0): undefined reference to InputManager::Controller::Controller()'
/tmp/ccojDm13.o:Main.cpp:(.text+0x411): undefined reference to InputManager::Controller::mapKey(SDL_Scancode, InputButton)' /tmp/ccojDm13.o:Main.cpp:(.text+0x42b): undefined reference to InputManager::Controller::mapKey(SDL_Scancode, InputButton)'
/tmp/ccojDm13.o:Main.cpp:(.text+0x445): undefined reference to InputManager::Controller::mapKey(SDL_Scancode, InputButton)' /tmp/ccojDm13.o:Main.cpp:(.text+0x45f): undefined reference to InputManager::Controller::mapKey(SDL_Scancode, InputButton)'
/tmp/ccojDm13.o:Main.cpp:(.text+0x479): undefined reference to InputManager::Controller::mapKey(SDL_Scancode, InputButton)' /tmp/ccojDm13.o:Main.cpp:(.text+0x493): more undefined references to InputManager::Controller::mapKey(SDL_Scancode, InputButton)' follow
/tmp/ccojDm13.o:Main.cpp:(.text+0x4de): undefined reference to InputManager::addController(InputManager::Controller*)' /tmp/ccojDm13.o:Main.cpp:(.text+0x68a): undefined reference to SDL_Init'
/tmp/ccojDm13.o:Main.cpp:(.text+0x6b7): undefined reference to Mix_Init' /tmp/ccojDm13.o:Main.cpp:(.text+0x6e2): undefined reference to __imp_ilInit'
/tmp/ccojDm13.o:Main.cpp:(.text+0x71d): undefined reference to Game::Game(GameState*)' /tmp/ccojDm13.o:Main.cpp:(.text+0x729): undefined reference to Game::isRunning() const'
/tmp/ccojDm13.o:Main.cpp:(.text+0x739): undefined reference to Game::update()' /tmp/ccojDm13.o:Main.cpp:(.text+0x747): undefined reference to Game::~Game()'
/tmp/ccojDm13.o:Main.cpp:(.text+0x76e): undefined reference to Game::~Game()' /tmp/ccojDm13.o:Main.cpp:(.text+0x7d9): undefined reference to createGlobals()'
/tmp/ccojDm13.o:Main.cpp:(.text+0x810): undefined reference to SDL_GL_SetAttribute' /tmp/ccojDm13.o:Main.cpp:(.text+0x85a): undefined reference to SDL_CreateWindow'
/tmp/ccojDm13.o:Main.cpp:(.text+0x88c): undefined reference to SDL_GetError' /tmp/ccojDm13.o:Main.cpp:(.text+0x92b): undefined reference to SDL_GL_CreateContext'
/tmp/ccojDm13.o:Main.cpp:(.text+0x94b): undefined reference to SDL_GetError' /tmp/ccojDm13.o:Main.cpp:(.text+0x9f3): undefined reference to Mix_OpenAudio'
/tmp/ccojDm13.o:Main.cpp:(.text+0xa7f): undefined reference to Mix_AllocateChannels' /tmp/ccojDm13.o:Main.cpp:(.text+0xaac): undefined reference to destroyGlobals()'
/tmp/ccojDm13.o:Main.cpp:(.text+0xab1): undefined reference to Mix_HaltMusic' /tmp/ccojDm13.o:Main.cpp:(.text+0xab6): undefined reference to Mix_CloseAudio'
/tmp/ccojDm13.o:Main.cpp:(.text+0xabb): undefined reference to Mix_Quit' /tmp/ccojDm13.o:Main.cpp:(.text+0xac0): undefined reference to SDL_Quit'
/tmp/ccojDm13.o:Main.cpp:(.text+0xc88): undefined reference to IniFile::getValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const' /tmp/ccojDm13.o:Main.cpp:(.text+0xe02): undefined reference to IniFile::getValue(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&) const'
/tmp/ccojDm13.o:Main.cpp:(.text$_ZN6LoggerlsEPFRSoS0_E[_ZN6LoggerlsEPFRSoS0_E]+0x98): undefined reference to Logger::notifyListeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccojDm13.o:Main.cpp:(.text$_ZN12LoadingStateC1Ev[_ZN12LoadingStateC1Ev]+0x19): undefined reference to GameState::GameState(bool)'
/tmp/ccojDm13.o:Main.cpp:(.text$ZN6LoggerlsIPKcEERS_T[ZN6LoggerlsIPKcEERS_T]+0xa4): undefined reference to Logger::notifyListeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccojDm13.o:Main.cpp:(.text$_ZN6LoggerlsIcEERS_T_[_ZN6LoggerlsIcEERS_T_]+0xa3): undefined reference to Logger::notifyListeners(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/tmp/ccojDm13.o:Main.cpp:(.text$ZN6LoggerlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS_T[ZN6LoggerlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS_T]+0xa4): undefined reference to Logger::notifyListeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccojDm13.o:Main.cpp:(.text$_ZN6LoggerlsIiEERS_T_[_ZN6LoggerlsIiEERS_T_]+0x9e): undefined reference to Logger::notifyListeners(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/tmp/ccojDm13.o:Main.cpp:(.text$ZN6LoggerlsIbEERS_T[ZN6LoggerlsIbEERS_T]+0xa3): undefined reference to Logger::notifyListeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccojDm13.o:Main.cpp:(.rdata$.refptr.window[.refptr.window]+0x0): undefined reference to window'
/tmp/ccojDm13.o:Main.cpp:(.rdata$.refptr._ZTV12LoadingState[.refptr._ZTV12LoadingState]+0x0): undefined reference to vtable for LoadingState' /usr/lib/gcc/x86_64-w64-mingw32/5.3-win32/../../../../x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): In function main':
/build/mingw-w64-_1w3Xm/mingw-w64-4.0.4/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain'
collect2: error: ld returned 1 exit status

@MitchellSternke
Copy link
Owner

Hi @DaivikDave,

How are you compiling this? Can you show me the command you are using (if you're using one)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants