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

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #105 on: February 24, 2006, 04:02:38 am »
Evidently I was not alone in my concerns - the 'nightly' build from last night has many of these issues resolved or at least much improved.  Things are *much* more clearly labled at some of the critical points that were deviling me.   There are also improved instructions on how to proceed through the process. 

I haven't got wxWidgets installed sanely yet, and I still have not successfully compiled anything, but at least I can see some shapes in the darkness.

Thanks,

--dave

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #106 on: February 24, 2006, 05:12:46 am »
Ok, there is still something that is I'm not comprehending.  I have nuked my CodeBlocks & wxWidgets & MinGW installs and reinstalled everything as recommended  by the good advisors on this forum.  This time I used the MinGW 5.0.2 installer, which has backed me off to gcc v 3.4.2 (from 3.4.4) and installed wxWidgets 2.6.2 instead of 2.6.3-rc1. 

Following the directions on the page "Compiling wxWidgets 2.6.1 to develop Code::Blocks (MSW)" as instructed, I encounter a problem I grappled with when I built wxWidgets the last time.  Either command (at a cmd.exe prompt):

D:\bin\CodeBlocks\wx\build\msw>mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 clean
- or -
D:\bin\CodeBlocks\wx\build\msw>make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0

is greeted with derision by the makefiles, beginning in the general form of:

if not exist gcc_mswdll mkdir gcc_mswdll
C:\DOCUME~1\ADMINI~1.OUT\LOCALS~1\Temp\make13042.sh: command not found: not [1]
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
C:\DOCUME~1\ADMINI~1.OUT\LOCALS~1\Temp\make13043.sh: command not found: not [1]
if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw
C:\DOCUME~1\ADMINI~1.OUT\LOCALS~1\Temp\make13044.sh: command not found: not [1]
if not exist ..\..\lib\gcc_dll\msw\wx mkdir ..\..\lib\gcc_dll\msw\wx
C:\DOCUME~1\ADMINI~1.OUT\LOCALS~1\Temp\make13044.sh: command not found: not [1]
if not exist ..\..\lib\gcc_dll\msw\wx mkdir ..\..\lib\gcc_dll\msw\wx
C:\DOCUME~1\ADMINI~1.OUT\LOCALS~1\Temp\make13045.sh: command not found: not [1]
if not exist ..\..\lib\gcc_dll\msw\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\msw\wx\setup.h
C:\DOCUME~1\ADMINI~1.OUT\LOCALS~1\Temp\make13046.sh: command not found: not [1]
gcc -c -o gcc_mswdll\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -I..\..\include -I..\..\lib\gcc_dll\msw -D__WXMSW
__    -MTgcc_mswdll\wxregex_regcomp.o -MFgcc_mswdll\wxregex_regcomp.o.d -MD ../../src/regex/regcomp.c
In file included from ../../include/wx/defs.h:21,
                 from ../../include/wx/wxchar.h:21,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
../../include/wx/platform.h:190:22: wx/setup.h: No such file or directory
In file included from ../../include/wx/platform.h:258,
                 from ../../include/wx/defs.h:21,
                 from ../../include/wx/wxchar.h:21,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:

... etc, followed by a good dose of the now familiar:

../../include/wx/chkconf.h:84:9: #error "wxUSE_DYNLIB_CLASS must be defined."
../../include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
../../include/wx/chkconf.h:100:9: #error "wxUSE_FILESYSTEM must be defined."
../../include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
../../include/wx/chkconf.h:121:9: #error "wxUSE_LOG must be defined."
../../include/wx/chkconf.h:129:9: #error "wxUSE_LONGLONG must be defined."
../../include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
../../include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
../../include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
../../include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
../../include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
../../include/wx/chkconf.h:219:9: #error "wxUSE_SOCKETS must be defined."
../../include/wx/chkconf.h:227:9: #error "wxUSE_STREAMS must be defined."
../../include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."

... etc, etc.

This implies to me that I have not given proper attention to the configuration of the build in some important way, such as by running configure.  I got around all this the last time by using msys and running configure, and then running the build from the msys prompt.  This despite the fact that everything in the recommended procedure (and install-msw.txt) seems to tell me *not* to do this.  At least that way I was able to do a successful build and get the libraries and setup.h that I needed.  Something seems to be seriously missing here.  I am certain that whatever I am doing wrong seems too obvious to mention for old hands at this process.  But it certainly has caused me an excess of grief.

as always, I am hoping someone can show me the error(s) of my ways.

thanks,

--dave

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #107 on: February 24, 2006, 06:24:29 am »
This despite the fact that everything in the recommended procedure (and install-msw.txt) seems to tell me *not* to do this.
Indeed; the Windows downloads for wxWidgets come preconfigured with the correct makefiles to build everything, and do not require MSys or any traditional Unix shell utilities at all. Thus, two possibilities come to mind:
1. You have the wrong wxWidgets installation. Make sure it's wxMSW-2.6.2.zip, or wxWidgets-2.6.3-rc1.zip (I have successfully built and used both).
2. The make executable included with MSys is somehow interfering with the original mingw32-make, or mingw32-make or related files have been overwritten somehow.

Whatever the case, commands such as "if not exist" belong only in the Unix-style build system and are not used in the MSW build.

Of the two commands you posted, the second is entirely correct, although it will only clean the directory of output files; the second should be "mingw32-make" instead of the plain "make", and once corrected should perform the build. Sometimes it's the little things like that which trip you up, and all you can do is try again.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #108 on: February 24, 2006, 08:16:15 am »
D:\bin\CodeBlocks\wx\build\msw>mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 clean
Please note that unless you are really want a non-Unicode (for an ANSI build of C::B) build I would suggest that you do a UNICODE=1.
Furthermore, things I've noticed:
- Why do you have installed wxWidgets to D:\bin\CodeBlocks\wx? It doesn't belong to C::B so I would suggest a clear seperation, as e.g. a folder D:\bin\CodeBlocks\ for the C::B sources and D:\bin\wxWidgets\ for wxWidgets. This may avboid conflicts in directories.
- Did you verify that you don't have setup any PATH to conflicting compilers etc? Thus is you have a conflicting gcc/make/whatever program in the way such errors could be caused by that.

I've attached you a a batch file (Windows) that I personally use to compile wxWidgets 2.6.2 successully. You might want to give this a try. You should only have to setup th path's accordingly. Please note that in the batch file I'm using the compiler suite that ships with the RC2 of C::B. But this should also work if you install MinGW only (NOT MSYS!). You can also download the packages that are required from the MinGW webpage. I use:
- binutils-2.16.91-20060119-1.tar.gz
- gcc-core-3.4.5-20060117-1.tar.gz
- gcc-g++-3.4.5-20060117-1.tar.gz
- gcc-g77-3.4.5-20060117-1.tar.gz
- mingw-runtime-3.9.tar.gz
- mingw-utils-0.3.tar.gz
- mingw32-make-3.80.0-3.tar.gz
- w32api-3.6.tar.gz
- gdb-6.3-2_snapshot.zip
...simply extracted into ONE directory. This directory you would have to use with the batch file if you don't want to install RC2 with the compilers again. So replace "D:\Devel\CodeBlocks_RC2" with "D:\Devel\MinGW" in the batch file then.

Again: This batch file ensures no conflicts in the PATH which (for me) was important.

Good luck!

Morten.


[attachment deleted by admin]
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 Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #109 on: February 24, 2006, 09:15:25 am »
[...]Make sure it's wxMSW-2.6.2.zip, or wxWidgets-2.6.3-rc1.zip (I have successfully built and used both).

Did you build C::B with wxWidgets-2.6.3-rc1? If yes, did C::B looks as with wxWidgets-2.6.2? C::B gives me some layout problems with wxWidgets-2.6.3-rc1.

Best wishes,
Michael

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #110 on: February 24, 2006, 02:24:51 pm »
In reply to Tdragon:

"1. You have the wrong wxWidgets installation. Make sure it's wxMSW-2.6.2.zip, or wxWidgets-2.6.3-rc1.zip (I have successfully built and used both)."

-- I used 'wxMSW-2.6.2-Setup.exe'.  Last time I used wxWidgets-2.6.3-rc1.zip.  I will try removing the current installer-based package and try the 2.4.2 zip.

"2. The make executable included with MSys is somehow interfering with the original mingw32-make, or mingw32-make or related files have been overwritten somehow."

-- I completely uninstalled MSys before beginning the latest build.  I tested the versions of the tools from the command line, and made certain that the mingw tools I needed were ahead of everything else that could interfere in my path.

-- The command using 'make' instead of 'mingw32-make' was not actually what I used.  In composing the msg, I scrolled my cmd window back - just not far enough.  I tried plain 'make' after 'mingw32-make'  did not produce reasonable results.  Both produced identical output - since the shell commands used are not going to work at a Win32 command line.

Morten:

The location D:\bin\CodeBlocks\wx is just where things have ended up after many unsuccessful attempts.  I agree that it doesn't make good sense, and I have in the past and will in future use another location.  But I think that aesthetics aside, it is not impacting my build attempts.  The problem may lie in the fact that I used  'wxMSW-2.6.2-Setup.exe'.  I'm not even certain where I got it. I was accumulating so many versions that I did a bit of cleanup on my DL directory and now I don't have a zip copy, and I know that I did have it.  A fast connection just turns me into a download pig!

Michael:

I did build 2.6.3-rc1, and some paths seemed odd at the end.  I was unsure if it was something I did or something about the package.  I have nuked it now so I can't be sure what the problems were.  But some of the critical includes seemed to be buried in odd locations like wx/lib/wx/include/msw - an include directory under a lib directory?  or maybe it was just my carpal tunnel kicking in, causing unintended drag/drops in explorer.

thanks for all the input

-- dave




Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #111 on: February 24, 2006, 02:48:01 pm »
[...]that I did a bit of cleanup on my DL directory and now I don't have a zip copy, and I know that I did have it.
Sounds good to me, because I have used a ZIP file for wxWidgets, too. Did you try my bacth file then?
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

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #112 on: February 24, 2006, 02:53:56 pm »
I'm just about to try the batch file now.  I'll let you know how it goes.

thatnks,

-- dave

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #113 on: February 24, 2006, 03:13:33 pm »
It seems that SourceForge doesn't have a copy of wxWidgets-2.6.2.zip - it bounces me into a very large FTP directory.  There is a wxMSW-2.6.2.zip, and wxWidgets-2.6.3.zip and wxWidgets-2.6.2.bz2, etc.  I'll try the wxMSW-2.6.2.zip version, but something seems a bit screwed up on SF.

dave   

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #114 on: February 24, 2006, 03:25:15 pm »
Make sure it's wxMSW-2.6.2.zip, or wxWidgets-2.6.3-rc1.zip (I have successfully built and used both).
:)

Michael: Yep, I had layout problems too. In fact, I lost the debug toolbar entirely until I reverted to 2.6.2 and reset my layout settings to the default.
« Last Edit: February 24, 2006, 03:41:51 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #115 on: February 24, 2006, 03:47:58 pm »
I keep havong one aggravation after another.  Using Morten's batch file, I get:

gcc: installation problem, cannot exec `cc1': No such file or directory

On checking the directory where gcc & all the mingw stuff is, yes, there is no cc1.exe.  So I run the uninstaller for MinGW5.0.2 and it deletes everything, including the D:\bin\CodeBlocks directory that was the parent, and any other subdirectories below it. Now I will try to install CodeBlocks again, then Mingw from the individual pieces.  This is really dragging on...

dave

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #116 on: February 24, 2006, 04:14:01 pm »
This is really dragging on...
I can assure you: It will work at some point and you'll not regret the ability to compile C::B yourself... Just to hopefully decrease your frustration... ;-)
By the way: The MSW ZIP file should be pertfectly OK.
Morten.
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 TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #117 on: February 24, 2006, 04:29:43 pm »
On checking the directory where gcc & all the mingw stuff is, yes, there is no cc1.exe.
Actually, cc1.exe resides in <mingw>\libexec\gcc\mingw32\3.4.2, and gcc.exe usually has no trouble finding it (cc1.exe performs the actual compilation). It may be an issue with paths because of the batch file.

I'd really recommend installing MinGW first, and then just building wxWidgets, before you even install Code::Blocks. (Which, if you're using one of the nightlies like you should be, means the first time you run it.)
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #118 on: February 24, 2006, 04:41:01 pm »
It may be an issue with paths because of the batch file.
Could be, but then it wouldn't work for me, too... but it works?!
« Last Edit: February 24, 2006, 06:54:52 pm by MortenMacFly »
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

wittend

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #119 on: February 24, 2006, 06:46:01 pm »
Well, I'm happy to report that I have been making progress. 

Morten is right, his batch file is Ok, I had glossed over the line that sets the path (overriding the default) and had been making certain that my system path was pointing at the MinGW stuff.  My dumb mistake.  This is what was making it appear to me that the MinGW 5.0.2 installer had misbehaved.  (Though I still believe that it 'uninstalled' the directory that the MinGW stuff was installed *under*, along with my test projects - no biggie, but it might bear checking.)

I successfully ran the batch file build by commenting out the 'set path line' and, aside from a few zillion warnings, everything went well.  I built everything in the batch, just as it was.

Now, after installing CodeBlocks again from the nightly build and adjusting the paths as best I could, I created a minimal wxWidgets app, and compiled it.  Unfortunately, the linker is still not quite happy.  This is probably due to my lack of knowledge of its needs.  The error messages I get now are far less threatening, but I could still use some advice.   Here they are:

-------------- Build: default in testWX ---------------
mingw32-g++.exe -LD:\bin\wxWidgets-2.6.3\lib\gcc_dllUnicode -LD:\bin\wxWidgets-2.6.3\lib -LD:\bin\CodeBlocks\lib -LD:\bin\CodeBlocks\wx\lib  -o wxwidgets.exe .objs\main.o    ..\..\..\..\bin\wxWidgets-2.6.3\lib\gcc_dllUnicode\libwxmsw26u.a ..\..\..\..\bin\CodeBlocks\lib\libmingwthrd.a ..\..\..\..\bin\CodeBlocks\lib\libmingw32.a ..\..\..\..\bin\CodeBlocks\lib\libmingwex.a  -mwindows
.objs\main.o:main.cpp:(.text$_ZN12wxStringBase10ConcatSelfEjPKc[wxStringBase::ConcatSelf(unsigned int, char const*)]+0x22): undefined reference to `_imp___ZN12wxStringBase10ConcatSelfEjPKcj'
.objs\main.o:main.cpp:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x27): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
.objs\main.o:main.cpp:(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2c): undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\main.o:main.cpp:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x68): undefined reference to `wxApp::Initialize(int&, char**)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
thanks,

-- dave