wxWidgets defaultlib Проблема конфликтов MSVCRT - PullRequest
0 голосов
/ 26 января 2011

Итак, у меня есть небольшой проект с очень простым кодом. Все, что он действительно делает, это создает wxFrame следующим образом:

wxFrame(NULL, -1, title, wxPoint(-1, -1), wxSize(380, 220))

Нет проблем компиляции ни с одним из моих кодов. Проблема возникает, когда я делаю эту строку:

IMPLEMENT_APP(App);

Приложение:

class App: public wxApp

Итак, когда я делаю это и нажимаю на compile, у меня появляются следующие ошибки:

1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>CApp.obj : warning LNK4248: unresolved typeref token (01000019) for 'wxVideoMode'; image may not run
1>CLoadingFrame.obj : warning LNK4248: unresolved typeref token (01000019) for 'wxToolTip'; image may not run
1>CLoadingFrame.obj : warning LNK4248: unresolved typeref token (0100001A) for 'wxDropTarget'; image may not run
1>CLoadingFrame.obj : error LNK2020: unresolved token (0A000DB2) "int g_isPainting" (?g_isPainting@@3HA)
1>CApp.obj : error LNK2020: unresolved token (0A000DBE) "int g_isPainting" (?g_isPainting@@3HA)
1>CLoadingFrame.obj : error LNK2028: unresolved token (0A000DB4) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) referenced in function "protected: void __thiscall wxShadowObjectFields_wxImplementation_HashTable::ResizeTable(unsigned int)" (?ResizeTable@wxShadowObjectFields_wxImplementation_HashTable@@$$FIAEXI@Z)
1>CApp.obj : error LNK2028: unresolved token (0A000DC0) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " (?GetItem@wxVectorBase@@$$FIBEPBXI@Z)
1>CApp.obj : error LNK2019: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " (?GetItem@wxVectorBase@@$$FIBEPBXI@Z)
1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z)
1>CApp.obj : error LNK2001: unresolved external symbol "int g_isPainting" (?g_isPainting@@3HA)
1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "int g_isPainting" (?g_isPainting@@3HA)
1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(char const *,int,char const *,char const *,char const *)" (?OnAssertFailure@wxAppConsole@@UAEXPBDH000@Z)
1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(char const *,int,char const *,char const *)" (?OnAssert@wxAppConsole@@UAEXPBDH00@Z)
1>D:\WickedLauncher\WickedLauncherv2\Debug\WickedLauncherv2.exe : fatal error LNK1120: 8 unresolved externals

Буду признателен за любую помощь!

Привет.

1 Ответ

0 голосов
/ 26 января 2011

где определен g_isPainting?

Вы добавили правильную библиотеку в компоновщик для wxAppConsole?

...