Page 1 of 1

Unable to compile wxwidgets code

Posted: Sun Sep 14, 2014 5:26 am
by SaucyJack
Alright, I've been trying to get wxwidgets 3.0.1 to work with codelite 6.1.1 for about a week now. While I fixed the first few issues I encountered leveraging google, I can not find a solution to the problem I'm having. I'm running Windows 7 and my current build was taken direct from the tutorial here http://codelite.org/Developers/BuildingWxWidgetsWin. I'm getting 2625 errors,3036 warnings and it takes up about 30,000 lines in a text editor so I can only provide a sample below. Any solutions would be appreciated.

Code: Select all

C:\Windows\system32\cmd.exe /c "C:/MinGW-4.8.1/bin/mingw32-make.exe -j8 SHELL=cmd.exe  -e -f  "again.mk"  all"
----------Building project:[ again - Release ]----------
C:/MinGW-4.8.1/bin/g++.exe   -c  "C:/Projects/again/main.cpp" -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.0.1/lib/gcc_dll/mswu -IC:/wxWidgets-3.0.1/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport    -mthreads -LC:/wxWidgets-3.0.1/lib/gcc_dll -lwxmsw30u_richtext -lwxmsw30u_xrc -lwxmsw30u_aui -lwxmsw30u_html -lwxmsw30u_adv -lwxmsw30u_core -lwxbase30u_xml -lwxbase30u_net -lwxbase30u -lwxscintilla -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -DNDEBUG  -o ./Release/main.cpp.o -IC:/wxWidgets-3.0.1/include/wx  -I.
In file included from C:/wxWidgets-3.0.1/include/wx/time.h:13:0,
                 from C:/wxWidgets-3.0.1/include/wx/wxcrtbase.h:38,
                 from C:/wxWidgets-3.0.1/include/wx/string.h:45,
                 from C:/wxWidgets-3.0.1/include/wx/chartype.h:105,
                 from C:/wxWidgets-3.0.1/include/wx/debug.h:19,
                 from C:/wxWidgets-3.0.1/include/wx/defs.h:695,
                 from C:/wxWidgets-3.0.1/include/wx/wx.h:14,
                 from C:/Projects/again/main.cpp:1:
C:/wxWidgets-3.0.1/include/wx/longlong.h:45:10: warning: #warning "Your compiler does not appear to support 64 bit " "integers, using emulation class instead.\n" "Please report your compiler version to " "wx-dev@lists.wxwidgets.org!" [-Wcpp]
         #warning "Your compiler does not appear to support 64 bit "\
          ^
In file included from C:/wxWidgets-3.0.1/include/wx/time.h:13:0,
                 from C:/wxWidgets-3.0.1/include/wx/wxcrtbase.h:38,
                 from C:/wxWidgets-3.0.1/include/wx/string.h:45,
                 from C:/wxWidgets-3.0.1/include/wx/chartype.h:105,
                 from C:/wxWidgets-3.0.1/include/wx/debug.h:19,
                 from C:/wxWidgets-3.0.1/include/wx/defs.h:695,
                 from C:/wxWidgets-3.0.1/include/wx/wx.h:14,
                 from C:/Projects/again/main.cpp:1:
C:/wxWidgets-3.0.1/include/wx/longlong.h:787:5: error: 'wxString' does not name a type
     wxString ToString() const;
     ^
C:/wxWidgets-3.0.1/include/wx/longlong.h:797:5: error: 'wxString' does not name a type
     wxString& operator<<(wxString&, const wxLongLongWx&);
     ^
C:/wxWidgets-3.0.1/include/wx/longlong.h: In member function 'long int wxLongLongWx::ToLong() const':
C:/wxWidgets-3.0.1/include/wx/longlong.h:690:76: error: 'wxT' was not declared in this scope
                       wxT("wxLongLong to long conversion loss of precision") );
                                                                            ^
C:/wxWidgets-3.0.1/include/wx/longlong.h:690:78: error: 'wxASSERT_MSG' was not declared in this scope
                       wxT("wxLongLong to long conversion loss of precision") );
                                                                              ^
C:/wxWidgets-3.0.1/include/wx/longlong.h: At global scope:
C:/wxWidgets-3.0.1/include/wx/longlong.h:1003:5: error: 'wxString' does not name a type
     wxString ToString() const;
     ^
C:/wxWidgets-3.0.1/include/wx/longlong.h:1013:5: error: 'wxString' does not name a type
     wxString& operator<<(wxString&, const wxULongLongWx&);
     ^
C:/wxWidgets-3.0.1/include/wx/longlong.h: In constructor 'wxULongLongWx::wxULongLongWx(wxLongLongWx)':
C:/wxWidgets-3.0.1/include/wx/longlong.h:858:33: error: 'wxASSERT' was not declared in this scope
         wxASSERT(ll.GetHi() >= 0);
                                 ^
C:/wxWidgets-3.0.1/include/wx/longlong.h: In member function 'long unsigned int wxULongLongWx::ToULong() const':
C:/wxWidgets-3.0.1/include/wx/longlong.h:915:77: error: 'wxT' was not declared in this scope
                       wxT("wxULongLong to long conversion loss of precision") );
                                                                             ^
C:/wxWidgets-3.0.1/include/wx/longlong.h:915:79: error: 'wxASSERT_MSG' was not declared in this scope
                       wxT("wxULongLong to long conversion loss of precision") );
                                                                               ^
C:/wxWidgets-3.0.1/include/wx/longlong.h: In function 'wxLongLong operator-(long unsigned int, const wxULongLong&)':
C:/wxWidgets-3.0.1/include/wx/longlong.h:1069:24: error: 'wxInt32' was not declared in this scope
     return wxLongLong((wxInt32)ret.GetHi(),ret.GetLo());

Re: Unable to compile wxwidgets code

Posted: Sun Sep 14, 2014 11:55 am
by eranif
How did you build your wxWidgets? which compiler did you use?
It seems like a conflict with 32 and 64 bits compilers (from what I can see, your code is compiled with a 32 bit compiler)

EDIT: I have placed your code inside code tags
Eran