visual studio 2012
-
moin,
hat jemand schon problemlos mit wxwidgets von visual studio 2010 auf 2012 umsatteln können?
ich konnte wxwidgets 2.9.4 problemlos komplilieren, aber das simpelste programm funktioniert nicht.app.h
#ifndef __app_h__ #define __app_h__ class MyFrame1 : public wxFrame { public: MyFrame1( wxWindow* parent = NULL, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); ~MyFrame1(); }; class App : public wxApp { virtual bool OnInit(); virtual int OnExit(); }; #endif
app.cpp
#include "app.h" bool App::OnInit() { MyFrame1 *mainFrame = new MyFrame1(); mainFrame->Show(); SetTopWindow(mainFrame); return TRUE; } int App::OnExit() { return 0; } IMPLEMENT_APP(App) MyFrame1::MyFrame1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->Centre( wxBOTH ); } MyFrame1::~MyFrame1() { }
ich bekomme den fehler:
c:\wxwidgets-2.9.4\include\wx\msw\wrapwin.h(66): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "windows.h": No such file or directory
oder ist etwa dieser hinweis zu vs2012 von http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide#Version_information offiziell gültig?
Not yet supported at all, use at your own risk, will become supported in the future.
ich kann mir kaum vorstellen, dass diese weit verbreitete ide noch nicht supportet wird?!? und falls sie noch nicht supported wird: ich konnte nirgends einen hinweis darauf finden wann das denn der fall wäre?!?
-
Ich habs entpackt, gebaut, fertig.
Keine Probleme.
Eventuell liegt das Problem ja an deiner Installation.
-
ich komme hier immer noch nicht weiter, leider. ich habe jetzt alle module von vc11 installiert, wxwidgets 2.9.4 mit vc11 erfolgreich kompiliert und die umgebungsvariable WXWIN auf C:\wxWidgets-2.9.4_vc11 geändert (inkl. neustart).
die zusätzlichen includeverzeichnisse sind (WXWIN)\\lib\\vc\_dll\\mswud;(WXWIN)\include; und bibliotheken $(WXWIN)\lib\vc_dll;ich bekomme den fehler beginnend mit
1>------ Erstellen gestartet: Projekt: mnml, Konfiguration: Debug Win32 ------
1>Der Buildvorgang wurde am 03.01.2013 13:43:00 gestartet.
1>InitializeBuildStatus:
1> Aktualisieren des Timestamps von "Debug\mnml.unsuccessfulbuild".
1>ClCompile:
1> app.cpp
1>app.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""struct wxPrivate::UntypedBufferData * __cdecl wxPrivate::GetUntypedNullData(void)" (?GetUntypedNullData@wxPrivate@@YAPAUUntypedBufferData@1@XZ)" in Funktion ""protected: static struct wxScopedCharTypeBuffer<wchar_t>::Data * __cdecl wxScopedCharTypeBuffer<wchar_t>::GetNullData(void)" (?GetNullData@?wxScopedCharTypeBuffer@_W@@KAPAUData@1@XZ)". 1>app.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""class wxMBConv * \_\_cdecl wxGet\_wxConvLibcPtr(void)" (?wxGet\_wxConvLibcPtr@@YAPAVwxMBConv@@XZ)" in Funktion ""class wxMBConv & \_\_cdecl wxGet\_wxConvLibc(void)" (?wxGet\_wxConvLibc@@YAAAVwxMBConv@@XZ)". 1>app.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""private: static struct wxString::SubstrBufFromType> \_\_cdecl wxString::ConvertStr(char const *,unsigned int,class wxMBConv const &)" (?ConvertStr@wxString@@CA?AU?SubstrBufFromType@V?wxScopedCharTypeBuffer@\_W@@@1@PBDIABVwxMBConv@@@Z)" in Funktion ""private: static class wxScopedCharTypeBuffer \_\_cdecl wxString::ImplStr(char const *,class wxMBConv const &)" (?ImplStr@wxString@@CA?AV?wxScopedCharTypeBuffer@_W@@PBDABVwxMBConv@@@Z)".
1>app.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: void __thiscall wxObject::Ref(class wxObject const &)" (?Ref@wxObject@@QAEXABV1@@Z)" in Funktion ""public: class wxObject & __thiscall wxObject::operator=(class wxObject const &)" (??4wxObject@@QAEAAV0@ABV0@@Z)".woran kann das liegen?!
-
dieser forumsbeitrag hat mir geholfen das problem zu lösen:
http://forums.wxwidgets.org/viewtopic.php?f=19&t=36557
es hing an fehlenden linker abhängigkeiten, die ich aus dem sample projekt minimal rauskopieren konnte.