Question

I'm using Code::Blocks, and I have installed wxWidgets 2.8. Everything worked ok, I have used wxSmith to create the gui elements, edit it, compile/rebuild without any errors.

Than I wanted to test the wxStyledTextCtrl, so I have added it to the project. However in line:

wxStyledTextCtrl* text = new wxStyledTextCtrl(this, wxID_ANY);

I get error from linker:

Undefined reference to _imp__wxSTCNameStr

And few more...

What should I do? Maybe using wxStyledTextCtrl require to install something or put in some directories?

I have found on the internet that I can change paths for wx from gcc_dll to gcc_lib but that doesn't works.

I'm working on Windows 7 x64 (but I don't think it's a problem, because I use x32 libs, build x32 .exe etc.).

Était-ce utile?

La solution

wxStyledTextCtrl is not part of the core controls and for this reason it doesn't exist with the rest of the edit/button/list/etc controls, it's one of the libraries contributed to wxWidgets and it exists in a separate library, the file on my system(linux) is called wx_gtk2u_stc-2.8, for you it should be something like *wx_mswu_stc-2.8* You need to make sure that it is built along with wx.

You can find samples for wxStyledTextControl in contrib/samples/stc subfolder and you can check which library this sample links with and use it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top