Author Topic: wxWidgets problem when compiling scintilla  (Read 8601 times)

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
wxWidgets problem when compiling scintilla
« on: February 24, 2008, 11:24:27 am »
Hi all,
I am building codeblocks from source, but get consistent wxwidgets errors when trying to build scintilla:
In the file buffer.h: in constructor wxCharBuffer::wxCharBuffer: 'stdrup undeclared' and numerous other errors (sorry, but 'copy to clipboard' in cb does not work either).
Any ideas?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets problem when compiling scintilla
« Reply #1 on: February 24, 2008, 08:51:58 pm »
Note: I am guessing you are a windows user, if not please state your OS.

Did you compile wxWidgets yourself?
If yes, what was the command used?
If no, where did you get wxWidgets?
What version is your wxWidgets?

Tim S

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets problem when compiling scintilla
« Reply #2 on: February 24, 2008, 08:59:53 pm »
Sorry for being uninformative.
I am using wxWidgets-2.8.7, which I got from wxwidgets.org and compiled myself. I am on windows xp, and used the command "mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release" in an ordinary command shell (i.e. not using msys). I have tried cleaning the build and recompiling, but that does not change the problem. My wxwidgets is installed to C:\C++\Libraries\wxWidgets-2.8.7 , and that is the directory where I direct the wx global variable. The code::blocks I am using is a selfcompiled one (end of november 2007), compiled with wxmsw-2.8.6.
Thanks for looking at this :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets problem when compiling scintilla
« Reply #3 on: February 24, 2008, 09:13:02 pm »
"mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release"

Try using "mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1"
( Clean and rebuild wxWidgets using the above command.)

The Code::Blocks project assumes Unicode version of wxWidgets is used under windows.

If doing, Windows 9x you may have to do ANSI version and edit the project file, but under Windows XP this is not needed.

Tim S
« Last Edit: February 24, 2008, 09:15:48 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets problem when compiling scintilla
« Reply #4 on: February 25, 2008, 12:10:31 pm »
I am sorry that does not solve the problem.
I have now uninstalled wxWidgets, removed the folders, downloaded a new wxMSW-2.8.7-setup.exe file and extracted it.
After that I ran clean and build with the command you suggest (remembering unicode).
The problem persists unchanged.
I then rebuilt (as opposed to build) codeblocks.cbp, and the compilation now fails at Autorevision.cpp: in function bool QuerySVN(...): 'popen' undeclared.
Could all this be solved if I just wait for the new stable version (hooray!) to be released?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets problem when compiling scintilla
« Reply #5 on: February 25, 2008, 12:48:09 pm »
In the file buffer.h: in constructor wxCharBuffer::wxCharBuffer: 'stdrup undeclared' and numerous other errors (sorry, but 'copy to clipboard' in cb does not work either).

Possibly you didn't install win32api / MinGW runtime.
Be a part of the solution, not a part of the problem.

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets problem when compiling scintilla
« Reply #6 on: February 25, 2008, 02:59:57 pm »
Yes, I have the full MinGW-5.1.3 package installed, including the win32api (if I understand you correctly??). To make sure, I just updated to the most recent mingw release, and that does not change the problem.
Weird.
Maybe my c::b is a bit broken...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets problem when compiling scintilla
« Reply #7 on: February 25, 2008, 04:25:42 pm »
Yes, I have the full MinGW-5.1.3 package installed, including the win32api (if I understand you correctly??). To make sure, I just updated to the most recent mingw release, and that does not change the problem.
Weird.
Maybe my c::b is a bit broken...

strdup is defined in string.h and this file is part of MinGW Runtime package. Download it from the following link.
Quote
http://downloads.sourceforge.net/mingw/mingw-runtime-3.14.tar.gz

This should solve your problem. If it's installed then check whether the string.h file is present under <mingw_dir>\include dir.
Be a part of the solution, not a part of the problem.

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets problem when compiling scintilla
« Reply #8 on: February 25, 2008, 04:54:57 pm »
No, this is a real mystery!
I have the full MinGW package, and string.h is in the mingw\include folder as it should be. Just to be sure I installed it again from the link you posted. I also downloaded the latest c::b nightly and tried compiling from that instead.
Nothing helps :(
Can it somehow be the interchange between c::b and mingw that is the problem?

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets problem when compiling scintilla
« Reply #9 on: February 25, 2008, 05:01:39 pm »
Maybe my mingw is the problem. Now it does not want to compile my old projects either, an error in file ctrl.c: _cpu_features_init not found.
So this may not be a c::b installation problem.