Author Topic: wxWidgets 2.6 (MSW, GCC) installation instructions  (Read 105423 times)

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #90 on: January 31, 2006, 06:37:25 pm »
Try this too

Code: DOS
  1. C:\Dev\wxWidgets-2.6.2\build\msw>mingw32-make -f makefile.gcc BUILD=release
  2.  

I think you are supposed to tell wx which build to build. Ex. release or debug....... I could be wrong though.

You do need mingw32-make ver 3.80 just like killerbot said.  :D


Well, the release build is, I believe, the default. You can find the default values for all settings in the config.gcc file. You can even edit it so as to be able to build your wxWidgets the way you want it, without having to pass your options in the command line.

Offline Gregorius

  • Single posting newcomer
  • *
  • Posts: 5
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #91 on: January 31, 2006, 06:59:07 pm »
Still the same...
I have make version 3.80. I've downloaded the newest make (3.80 too) from MinGW website and it still don't works :(
It is the only "mingw32-make.*" I have on my whole harddrive (checked with "Explorer Find").

I have Borland C++ 5.5 Compiler installed, but I've removed its bin directory from PATH (I'm sure its not in the path)...
Maybe I'll try tomorrow with another computer, it may be a software collision with something :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #92 on: January 31, 2006, 07:38:49 pm »
Quote
Can anybody help me with my "stupid" error?

You are using "MSYS make" (or make under MSYS). Please use the standalone "make"...
Be patient!
This bug will be fixed soon...

Offline Gregorius

  • Single posting newcomer
  • *
  • Posts: 5
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #93 on: January 31, 2006, 08:10:11 pm »
I don't use MSYS at all... I've tried to "make" with MSYS too, but I get exactly the same error!

Anyway, it is working! :)
I've just tried to build wxWidgets on my desktop PC, and there's no such problem!
I was trying to build it on my notebook previously.
I did it exactly the same way: installed CodeBlocks, added its bin to PATH, unpacked wxWidgets and no more "syntax errors"... strange.

I think it is a matter of some other software, but I just can't find what it could be. If I'll find out, I will let you know.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #94 on: January 31, 2006, 08:42:34 pm »
I think it is a matter of some other software, but I just can't find what it could be. If I'll find out, I will let you know.

May be it is a "problem(s)" with the PATH or other configuration settings. Try to compare both (notbook and Desktop PC) and see if the are some notable differences.

Michael
« Last Edit: February 01, 2006, 06:51:33 pm by Michael »

Offline Gregorius

  • Single posting newcomer
  • *
  • Posts: 5
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #95 on: February 01, 2006, 06:43:04 pm »
I still don't know why the build fails on my notebook. PATH settings are identical on both computers  :?

I've compiled wxWidgets on my desktop PC and copied 'lib' directory to my notebook then. C::B are working great on both computers now :) There is no problem with building and debugging wxWidgets apps.

C::B is a great tool, I really like it :)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #96 on: February 01, 2006, 06:54:00 pm »
I still don't know why the build fails on my notebook. PATH settings are identical on both computers  :?

May be it is related to software and/or DLL conflicts.

Michael

Offline wittend

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #97 on: February 23, 2006, 05:55:34 pm »
I am a fairly experienced programmer in both *NIX & Win32, but I am new to Code::Blocks.  I have used the DevC++ environment with wxWidgets successfully in the past.  But I recently despaired of ever getting 4.9.9.2 & wxWidgets configured correctly on my system and decided to give Code::Blocks a try.  After installing the IDE (at D:\bin\Codeblocks) I with some difficulty got wxWidgets to build - I believe in the Release/ANSI/DLL configuration.  I have WxWidgets installed at D:\bin\Codeblocks\wx. 

when I create a wxWidgets project using C::B I get an irritating warning that I do not know how to prevent for future sessions, but which I can temporarily correct and live with.  I go into project->build options->custom variables and change WX_DIR to "D:\bin\CodeBlocks\wx".

At this point I try to build this minimal application and am rewarded with an effulgence of error messages to the effect:

Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\bin\CodeBlocks\Work\
--------------------------------------------------------------------------------
Switching to target: default
Precompiling header: wx_pch.h
In file included from D:/bin/CodeBlocks/wx/include/wx/string.h:55,
                 from D:/bin/CodeBlocks/wx/include/wx/wxchar.h:139,
                 from D:/bin/CodeBlocks/wx/include/wx/debug.h:22,
                 from D:/bin/CodeBlocks/wx/include/wx/defs.h:503,
                 from D:/bin/CodeBlocks/wx/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:6:
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In constructor `wxCharBuffer::wxCharBuffer(const char*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:96: error: `strdup' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h:96: error: (Each undeclared identifier is reported only once for each function it appears in.)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `wxCharBuffer& wxCharBuffer::operator=(const char*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:96: error: `strdup' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In constructor `wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:100: error: `wxStrdupW' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:100: error: `wxStrdupW' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: At global scope:
D:/bin/CodeBlocks/wx/include/wx/buffer.h:177: error: ISO C++ forbids declaration of `DECLARE_NO_COPY_CLASS' with no type
D:/bin/CodeBlocks/wx/include/wx/buffer.h:177: error: expected `;' before '}' token
D:/bin/CodeBlocks/wx/include/wx/buffer.h:177: error: expected `;' before '}' token
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `void wxMemoryBuffer::SetDataLen(size_t)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:217: error: `wxASSERT' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `void wxMemoryBuffer::AppendByte(char)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:247: error: `_T' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h:247: error: `wxCHECK_RET' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/buffer.h: In member function `void wxMemoryBuffer::AppendData(void*, size_t)':
D:/bin/CodeBlocks/wx/include/wx/buffer.h:256: error: `memcpy' undeclared (first use this function)
In file included from D:/bin/CodeBlocks/wx/include/wx/string.h:56,
                 from D:/bin/CodeBlocks/wx/include/wx/wxchar.h:139,
                 from D:/bin/CodeBlocks/wx/include/wx/debug.h:22,
                 from D:/bin/CodeBlocks/wx/include/wx/defs.h:503,
                 from D:/bin/CodeBlocks/wx/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:6:
D:/bin/CodeBlocks/wx/include/wx/strconv.h: At global scope:
D:/bin/CodeBlocks/wx/include/wx/strconv.h:201: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/strconv.h:201: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/strconv.h:226: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/strconv.h:226: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/strconv.h:231: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/strconv.h:231: error: expected `;' before '*' token
In file included from D:/bin/CodeBlocks/wx/include/wx/wxchar.h:139,
                 from D:/bin/CodeBlocks/wx/include/wx/debug.h:22,
                 from D:/bin/CodeBlocks/wx/include/wx/defs.h:503,
                 from D:/bin/CodeBlocks/wx/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:6:
D:/bin/CodeBlocks/wx/include/wx/string.h:87: error: expected init-declarator before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:87: error: expected `,' or `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h: In function `size_t Strlen(const char*)':
D:/bin/CodeBlocks/wx/include/wx/string.h:102: error: `strlen' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/string.h: In function `int Stricmp(const char*, const char*)':
D:/bin/CodeBlocks/wx/include/wx/string.h:135: error: `strcasecmp' undeclared (first use this function)
D:/bin/CodeBlocks/wx/include/wx/string.h: At global scope:
D:/bin/CodeBlocks/wx/include/wx/string.h:217: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:217: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:220: error: expected `;' before "bool"
D:/bin/CodeBlocks/wx/include/wx/string.h:256: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:256: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:266: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:266: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:276: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:276: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:279: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:279: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:280: error: expected `,' or `...' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:281: error: ISO C++ forbids declaration of `wxChar' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:281: error: `bool wxStringBase::ConcatSelf(size_t, int)' and `bool wxStringBase::ConcatSelf(size_t, int)' cannot be overloaded
D:/bin/CodeBlocks/wx/include/wx/string.h:292: error: `wxChar' does not name a type
D:/bin/CodeBlocks/wx/include/wx/string.h:293: error: `wxChar' does not name a type
D:/bin/CodeBlocks/wx/include/wx/string.h:295: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:295: error: expected `;' before '&' token
D:/bin/CodeBlocks/wx/include/wx/string.h:296: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:296: error: expected `;' before '&' token
D:/bin/CodeBlocks/wx/include/wx/string.h:297: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:297: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:298: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:298: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:299: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:299: error: expected `;' before '*' token
D:/bin/CodeBlocks/wx/include/wx/string.h:300: error: ISO C++ forbids declaration of `value_type' with no type
D:/bin/CodeBlocks/wx/include/wx/string.h:300: error: expected `;' before '*' token
Process terminated with status 1 (0 minutes, 3 seconds)
52 errors, 0 warnings
 
I know that the source of my problems must be simple, but searching the FAQ's and the documentation and these fora have not yeilded any (understandable to me) solutions.  I would appreciate any help anyone can offer.

-- Dave


Extra Info:
========

When I check gcc --version crom a cmd.exe command line the response is:
   D:\bin\CodeBlocks>gcc --version
   "gcc (GCC) 3.4.4 (mingw special)". 
Checking make, I get:
   D:\bin\CodeBlocks>make --version
   "GNU Make version 3.77, by Richard Stallman and Roland McGrath."

Checking mingw versions from the command line (cmd.exe) I get:
   D:\bin\CodeBlocks>mingw32-gcc --version
   mingw32-gcc (GCC) 3.4.4 (mingw special)
and
   D:\bin\CodeBlocks>mingw32-make --version
   GNU Make 3.80

all of these commands are following the system path to locate the desired executable.  Executing the same commands from the MinGW command line from /d/bin/CodeBlocks gives me exactly the same results.




[attachment deleted by admin]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #98 on: February 23, 2006, 06:07:38 pm »
[...]
Could you please tell what version of C::B you are using? The RC2?
Furthermore: Please enable "Full command line" (in the compiler settings under "Other") and post the compiler log again. This will ensure we'll see the full command line that fails to compile.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #99 on: February 23, 2006, 06:10:05 pm »
Firstly, I highly recommend upgrading to one of the Nightly builds which can be found here. They are more feature-rich, and fix many bugs and annoyances (such as your warning, by using a "global variable" WX that you only need to set once). If you choose to use a nightly build you will need to:
  • Uninstall C::B RC2 and delete any residual directories on your hard drive
  • Install MinGW separately (I recommend the new 5.0.2 installer)
  • Download the nightly build and the wxWidgets DLL and unzip them to the same directory

A newer version of Code::Blocks may or may not fix your errors; I suspect they're stemming from idiosyncracies within GCC or wxWidgets themselves. A look at the actual command line being used to run GCC would be helpful; this is done by changing the Compiler logging setting to "Full command line" (in the Other tab of your global compiler settings).
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline wittend

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #100 on: February 23, 2006, 06:17:51 pm »
The version of C::B is 1.0, RC2.

I changed that setting (glad to know that it exists!) and now the output is:

Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\bin\CodeBlocks\Work\
--------------------------------------------------------------------------------
Switching to target: default
mingw32-g++.exe   -pipe -mthreads -Winvalid-pch -include "wx_pch.h" -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DUSE_PCH    -ID:\bin\CodeBlocks\wx\include -ID:\bin\CodeBlocks\wx\lib\wx\include\msw-ansi-release-2.6\wx\msw -ID:\bin\CodeBlocks\wx\contrib\include  -ID:\bin\CodeBlocks\wx\include -ID:\bin\CodeBlocks\wx\lib\wx\include\\wx\msw -ID:\bin\CodeBlocks\wx\include\wx -ID:\bin\CodeBlocks\wx\contrib\include -c wx_pch.h -o wx_pch.h.gch
In file included from D:/bin/CodeBlocks/wx/include/wx/string.h:55,
[and so forth...]

I belive that the rest of the output is the same.

Thanks,

dave

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #101 on: February 23, 2006, 06:36:13 pm »
The only thing outstandingly wrong with that command line is here: "-ID:\bin\CodeBlocks\wx\lib\wx\include\\wx\msw", where I note double backslashes. If you fix that, it may work.

It could also, however, be your directory structure that's working against you. Most of the users here have followed these instructions from the Code::Blocks wiki in compiling wxWidgets (they are the same for version 2.6.2, which is the best version to use). If you have this setup, then the only paths your project needs to use wxWidgets are <wxwidgets>\lib\gcc_dll\msw and <wxwidgets>\include for include paths, and <wxwidgets>\lib\gcc_dll for library paths.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #102 on: February 23, 2006, 07:08:51 pm »
D:\bin\CodeBlocks\wx\lib\wx\include\msw-ansi-release-2.6\wx\msw
D:\bin\CodeBlocks\wx\lib\wx\include\\wx\msw
Did you verify that these folders really exist? Under D:\bin\CodeBlocks\wx\lib\ shouldn't come another wx\include\. At least I don't have them. I assume the correct path for you should be D:\bin\CodeBlocks\wx\lib\msw-ansi-release-2.6\wx\msw. It seems you setup the path to the wxwidgets headers/libs incorrectly...?!
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline wittend

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #103 on: February 24, 2006, 12:33:02 am »
The folder "D:\bin\CodeBlocks\wx\lib\wx\include\msw-ansi-release-2.6\wx\msw" does indeed exist.  And in the second case, "D:\bin\CodeBlocks\wx\lib\msw-ansi-release-2.6\wx\msw" folder is what I intended, but the replacement macro $(WX_CNF) does not seem to be inserting the intended value - which is the missing "msw-ansi-release-2.6".  I too think that this whole arrangement is odd, but D:\bin\CodeBlocks\wx\lib\wx\include\msw-ansi-release-2.6\wx\msw is where 'rcdefs.h' was hiding, and the folder above it is where I found 'setup.h'.

I got lost in all of this because there seem to be several places where I can set 'Compiler Options'.  A quick survey finds five different ways to access this page.  While alternate ways to set things can be useful, I cannot determine which (if any) of the ways set parameters that persist as defaults across projects, and which are local to the current project.  I am also unclear which are really the ones affecting the current build.

In any case, after hardcoding the obviously invalid path, I still get the same results.  I have downloaded the Feb 22 nightly build and the other recommended bits, and will see about putting it all together afresh.

Thanks,

dave

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #104 on: February 24, 2006, 12:37:40 am »
I got lost in all of this because there seem to be several places where I can set 'Compiler Options'.  A quick survey finds five different ways to access this page.  While alternate ways to set things can be useful, I cannot determine which (if any) of the ways set parameters that persist as defaults across projects, and which are local to the current project.  I am also unclear which are really the ones affecting the current build.

You can search the forum about this. Some posts might be able to clarify your doubts, or at least to let you understand a bit more how it works :).

Best wishes,
Michael