Author Topic: Struggling with wxWidgets installation  (Read 7151 times)

BraveRobot

  • Guest
Struggling with wxWidgets installation
« on: August 10, 2012, 06:49:27 pm »
edit: Your community is unhelpful and I've chosen not to participate in it.
« Last Edit: August 10, 2012, 08:19:59 pm by BraveRobot »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Struggling with wxWidgets installation
« Reply #1 on: August 10, 2012, 06:54:26 pm »
Hi guys. I'm trying to make my first GUI and I'm having quite a bit of trouble getting everything I need installed. I'm following the wiki, but I think I need some help. I've been trying to do this on and off for a couple weeks by myself and it just isn't happening.

You surely neither follow the wike, nor read the notes on the wxWidgets page carefully.

Read this:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

Offline shiraz14

  • Single posting newcomer
  • *
  • Posts: 7
Re: Struggling with wxWidgets installation
« Reply #2 on: August 10, 2012, 08:02:28 pm »
Hi,

I too am facing a problem with the compilation of wxWidgets in C::B.

I'm using wxPack with the latest release of C::B for Windows (C::B 10.05) [which was installed with the MinGW option via the installer] and have read all the steps in the Wiki page which was linked to in Jen's post. I have also looked in the build.cfg file to identify the parameters for using wxWidgets in C::B, and used the correct parameters in this regard. I have also set the Environmental PATH variable and the toolchain executable path to the bin folder in MinGW in C::B. However, when I tried to create a blank wxWidget project in C::B and compile the code (to identify if wxWidget is able to generate a simple yet functional GUI), the error message in my C::B Build log is as follows:


-------------- Build: Debug in Project 1-1 ---------------

Precompiling header: wx_pch.h
In file included from C:\CodeBlocks\wxWidgets2.8\include/wx/string.h:55,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/log.h:47,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/private.h:24,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/wrapcdlg.h:18,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In constructor 'wxCharBuffer::wxCharBuffer(const char*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h: In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
In file included from C:\CodeBlocks\wxWidgets2.8\include/wx/log.h:47,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/private.h:24,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/wrapcdlg.h:18,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
C:\CodeBlocks\wxWidgets2.8\include/wx/string.h: In function 'int Stricmp(const char*, const char*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/string.h:141: error: 'strcasecmp' was not declared in this scope
In file included from C:\CodeBlocks\wxWidgets2.8\include/wx/gdicmn.h:20,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/private.h:213,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/msw/wrapcdlg.h:18,
                 from C:\CodeBlocks\wxWidgets2.8\include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxChar*)':
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h:406: error: 'strdup' was not declared in this scope
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxString&)':
C:\CodeBlocks\wxWidgets2.8\include/wx/list.h:408: error: 'strdup' was not declared in this scope
Process terminated with status 1 (0 minutes, 6 seconds)
7 errors, 0 warnings
 


The respective files (e.g. buffer.h, string.h & list.h) also open to indicate the source of the error when I place my cursor on the specified line.

As far as I am aware, I am using MinGW as the compiler of choice here, and everything has been installed correctly. When I run mingw32-make.exe, I get the following output:

C:\CodeBlocks\wxWidgets2.8\build\msw>mingw32-make.exe
mingw32-make.exe: *** No targets specified and no makefile found.  Stop.


This clearly indicates that MinGW has been properly installed in my system.

As such, please inform me as to what could have gone wrong here.

Thanks and I look forward to your reply.
« Last Edit: August 10, 2012, 08:28:40 pm by shiraz14 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Struggling with wxWidgets installation
« Reply #3 on: August 10, 2012, 08:28:18 pm »
@shiraz14:

Search the forum and the wiki and do what the error message suggests !

Please stop hijacking threads with a totally different problem !

You might get banned from the forum !!

Thank you !!!


@BraveRobot:

If the wiki article is too complicated (covers too much possible options), you can try this one: http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook#wxWidgets
Be arae, that the wxWidgets-exe for windows is just an installer for the sources, as they clearly state on their wwebsite as far as I rememeber !

Offline shiraz14

  • Single posting newcomer
  • *
  • Posts: 7
Re: Struggling with wxWidgets installation
« Reply #4 on: August 10, 2012, 08:43:09 pm »
@ jens:

Your manner in responding to posts in this Forum is provocative, offensive and threatening, which would be totally unbecoming of the conduct expected within a professional community of experienced programmers/developers assisting novices in this respect.

Have you not read the topic of this thread (Struggling with wxWidgets installation) which clearly relates to individuals who are facing difficulties in the installation of wxWidgets? The matter which I have surfaced in my previous post has evidently something related to wxWidgets installation, hence I have included it in this thread, which would not be considered hijacking in any sense. As you are both an experienced developer and an administrator, I would expect you to exercise due caution prior to hurling accusatory remarks and slanders online, which would only damage the reputability of a Forum such as this.

Thank you.

@shiraz14:

Search the forum and the wiki and do what the error message suggests !

Please stop hijacking threads with a totally different problem !

You might get banned from the forum !!

Thank you !!!


@BraveRobot:

If the wiki article is too complicated (covers too much possible options), you can try this one: http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook#wxWidgets
Be arae, that the wxWidgets-exe for windows is just an installer for the sources, as they clearly state on their wwebsite as far as I rememeber !

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Struggling with wxWidgets installation
« Reply #5 on: August 10, 2012, 10:07:28 pm »
Have you not read the topic of this thread (Struggling with wxWidgets installation)
Did you notice that this is a Code::Blocks, and not a wxWidgets forum?

We provide basic support for wxWidgets just for convenience only. But you should use the right forum in the first place.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Struggling with wxWidgets installation
« Reply #6 on: August 10, 2012, 10:30:09 pm »
@shiraz14:

Your post started with the invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] issue, not with the wxWidgets one.

Why did you edit your post ?
Just to tell me a liar, because I wrote your issue has nothing to do with the OP's one ?

That is offending !!

Be warned, don't ever try to do such thing or leave the forum.

And please do not say you are a professional programmer, if you are not able to compile wxWidgets with the help of our wiki, it's really not that hard.
« Last Edit: August 10, 2012, 11:15:06 pm by jens »

Offline shiraz14

  • Single posting newcomer
  • *
  • Posts: 7
Re: Struggling with wxWidgets installation
« Reply #7 on: August 11, 2012, 05:29:46 pm »
@ MortenMacFly:
Thanks for the reply.
As wxWidgets is included as a plugin for Code::Blocks (& most users of Code::Blocks would presumably employ wxWidgets for their OOP projects), I would expect some assistance (though probably not extensive as you have highlighted) to be provided within this Forum. Moreover, the problem which I have surfaced has more to do with the integration and usability of wxWidgets within the Code::Blocks IDE, rather than a pure technicality relating to wxWidgets stability as a compiled binary.

@ jens:
My initial post in this thread was on the "invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] issue". However, as this problem was resolved soon after the post was published (while a new problem emerged which was also related to wxWidgets installation & usability within Code::Blocks and thus comes under the same umbrella of this topic), I have edited my initial post to reflect this new issue, so as to avoid unnecessary allocation of resources to address an issue which has already been resolved. This has occurred before anyone (including you) responded to my previous post (& I would be aware of this since I have checked the Forum prior to making the changes in my initial post), hence any further response to my post would be to my most recent post (in the thread) which discussed the problems faced in compiling a wxWidgets project in Code::Blocks, & which would also be displayed on the Forum for future reference by users who experienced similar problems. In any instance, your statement below seems to portray that changes were made to my initial post after a response has been posted to it, which would be absolutely slanderous to me.

As for professionalism, you have displayed none of that in our correspondence thus far, while your mention about my not being able to compile wxWidgets while it's not that hard to do so (with the help of the wiki) is entirely irrelevant in this respect, since I am using the pre-compiled wxPack installer, which (according to the Wiki at http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef) should not even necessitate building. In addition, I've followed the instructions in the wiki, & ran into problems akin to the likes surfaced in my previous post [& even more issues when I attempted to build wxWidgets from the downloaded source files as according to a few wikis (please see the output below for an example of the output I get in the command prompt when building the program)] - that's why I posted this issue in the Forum.

Code output:
C:\CodeBlocks\wxWidgets2.8\build\msw>mingw32-make -f makefile.gcc BUILD=release
SHARED=1 MONOLITHIC=1 UNICODE=1
if not exist gcc_mswudll mkdir gcc_mswudll
process_begin: CreateProcess(NULL, -c "if not exist gcc_mswudll mkdir gcc_mswudl
l", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [gcc_mswudll] Error 2 (ignored)
gcc -E "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_dll\mswu\wx\msw\rcdef
s.h"
process_begin: CreateProcess(NULL, -c "gcc -E \"..\..\include\wx\msw\genrcdefs.h
\" > \"..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h\"", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h] Error 2


Now, if you'll excuse me, I do not wish to waste time and resources on fruitless and unproductive exchanges with you in this Forum, since the time and energy could be better spent by being channelled into something more productive and beneficial (such as resolving this issue).

Thank you.
« Last Edit: August 11, 2012, 05:35:09 pm by shiraz14 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Struggling with wxWidgets installation
« Reply #8 on: August 11, 2012, 06:04:10 pm »
[ ... ]
@ jens:
In any instance, your statement below seems to portray that changes were made to my initial post after a response has been posted to it, which would be absolutely slanderous to me.
[...]

Your edit was after my post, just 12 seconds, but it was after my post.
That's a fact, and you can not deny it, because everyone can clearly read this.

And editing posts in a way, that they say something totally different is not a good style in any way.

My answer was given to your invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] issue and it stays the same.

And your issue is still unrelated to C::B, but to wxWidgets and most likely an outdated version of binutils, which sometimes leads to problemas when trying to build wxWidgets.

But this is stiull a C::B forum, not a wxWidgets one.
And if you have problems compiling wxWidgets, that are not covered by our wiki, you probably should ask in the wxWidgets forum.

You have accepted our forum rules, when registering here.

Here is an excerpt:

This post is here to assist you in your Code::Blocks / C++ blues, by telling you what NOT to do. This is not to frighten you, but unfortunately we have to be that strict due to continuous mis-use and dis-respect.

[...]

3. Is your problem library, framework specific? There are appropriate forums for it, not the Code::Blocks forum.

4. Search before you post. If you've used other IDEs and you're moving to Code::Blocks, try reading the Wiki (e.g. http://wiki.codeblocks.org/index.php?title=FAQ) at the homepage, and if you're confused on how to set up things, SEARCH THE FORUM. Probably the answer you're looking for is in there. Remember, Google is your friend :)

[...]

7. Only after you have checked everything out and you're sure it's a Code::Blocks configuration problem / bug and not a C++ problem, post it.

[...]

Finale note: Ignoring these rules may result in the topic being (silently) locked and/or even removed completely without any notice.

In case you wonder why we are so strict: I could say: "Search the forum" - as this has been discussed a lot. To make is short: By law we (the devs/moderators) are responsible for the content of our forum. This means we need to read all posts. If you want us to continue the development of C::B and have the time to answer some of the questions that are really related to C::B, apply the rules above. It's obviously a matter of time for us.
[...]

Please respect the rules, or leave the forum.

We (admins) are forced by law to read each and any post in this forum, so please do not waste the time, we could spend in fixing bugs or enhancing C::B.

If you have questions that are really related to C::B , feel free to ask

Thank you !!

Topic locked !!