User forums > Help

Compile CodeBlocks by Cygwin

<< < (2/9) > >>

PetrPetrov:
Now I have build wxWidgets-2.8.12 by using GTK+ 2.0 library.

Note that I used "all port" source package for wxWidgets (http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz), wxGTK only had configuration/compilation problem.

I used
./configure --build=x86_64-pc-cygwin --with-gtk --without-msw --without-x11

line to configure wxWdigets.
After this, wxWidgets was build fine and installed successfully.
Note I was need to install additionally 'pkg-config' package for Cygwin, otherwise wxWidget configuration script did not find installed GTK 2.0 development libraries into my Cygwin.

However, I have the same error during compilation of C::B
src/wxscintilla.cpp:169:17: error: definition of static data member 'wxScintilla::ms_classInfo' of dllimport'd class
 IMPLEMENT_CLASS(wxScintilla, wxControl)
src/wxscintilla.cpp:170:25: error: definition of static data member 'wxScintillaEvent::ms_classInfo' of dllimport'd class
 IMPLEMENT_DYNAMIC_CLASS(wxScintillaEvent, wxCommandEvent)

PetrPetrov:
It seems that class that causes problem is wxScintilla.
This class defines some custom wxWidget control which is used insude C::B.

Source file of this class is here:
C:\cygwin64\usr\src\codeblocks-12.11release8629\src\sdk\wxscintilla\src\wxscintilla.cpp
and header file is here:
C:\cygwin64\usr\src\codeblocks-12.11release8629\src\sdk\wxscintilla\include\wx\wxscintilla.h

Code into header file:
class WXDLLIMPEXP_SCI wxScintilla : public wxControl {
public:
..... methods

It seems that wxScintilla or its parent class should define sm_eventTable member and some other members.
Also I see that problem is related to dllimport's class. I guess that wxControl is dll-imported class (this is because it is located into another library - wxWidget).
As workaround I can try to build wxWidget as a static library.

But I guess that problem is in WXMAKINGDLL_SCI macro.

wxscintilla.cpp is being compiled with -DWXUSINGDLL symbol which means to use wxWidget library as a shared library.
Also I see (in begin of wxscintilla.h):
#ifdef WXMAKINGDLL_SCI
    #define WXDLLIMPEXP_SCI WXEXPORT
#elif defined(WXUSINGDLL_SCI) || defined(WXUSINGDLL)
    #define WXDLLIMPEXP_SCI WXIMPORT
#else // not making nor using DLL
    #define WXDLLIMPEXP_SCI
#endif
And in such a case I think that  #define WXDLLIMPEXP_SCI WXIMPORT will be used!

wxscintilla class is part of C::B, not it is not part of wxWidget library, I think.
So, it uses wrong WXDLLIMPEXP_SCI macro.

PetrPetrov:
It seems that I have fixed above compilation error and build is going ahead now...

oBFusCATed:
Patches welcome...

PetrPetrov:
Another compilation error:
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../src/include -I/usr/local/lib/wx/include/gtk2univ-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWXUSINGDLL -D__WXUNIVERSAL__ -D__WXGTK__ -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/sdk/wxpropgrid/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/bindings -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -w -MT cbauibook.lo -MD -MP -MF .deps/cbauibook.Tpo -c cbauibook.cpp  -DDLL_EXPORT -DPIC -o .libs/cbauibook.o
In file included from /usr/local/include/wx-2.8/wx/window.h:1537:0,
                 from /usr/local/include/wx-2.8/wx/wx.h:36,
                 from /usr/local/include/wx-2.8/wx/wxprec.h:68,
                 from ../../src/include/sdk_common.h:37,
                 from ../../src/include/sdk_precomp.h:13,
                 from cbauibook.cpp:11:
/usr/local/include/wx-2.8/wx/univ/window.h:19:19: note: attribute for 'class wxControlRenderer' must follow the 'class' keyword
 class WXDLLEXPORT wxControlRenderer;
                   ^
cbauibook.cpp: In member function 'void cbAuiNotebook::OnMotion(wxMouseEvent&)':
cbauibook.cpp:414:39: error: 'class wxAuiTabCtrl' has no member named 'GetToolTip'
         wxToolTip* tooltip = tabCtrl->GetToolTip();
                                       ^
cbauibook.cpp:415:32: error: invalid use of incomplete type 'class wxToolTip'         if (!tooltip || tooltip->GetTip() != text)
                                ^
In file included from /usr/local/include/wx-2.8/wx/wx.h:36:0,
                 from /usr/local/include/wx-2.8/wx/wxprec.h:68,
                 from ../../src/include/sdk_common.h:37,
                 from ../../src/include/sdk_precomp.h:13,
                 from cbauibook.cpp:11:
/usr/local/include/wx-2.8/wx/window.h:65:28: error: forward declaration of 'class wxToolTip' class WXDLLIMPEXP_FWD_CORE wxToolTip;


It seems that C::B tries to use GetToolTip() method which is absent. Missing included header file? Any ideas?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version