Code::Blocks

User forums => Help => Topic started by: rickg22 on April 24, 2005, 06:12:24 am

Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on April 24, 2005, 06:12:24 am
IMPORTANT: This first post is now obsolete. Check the latest post for the instructions.

OK. Here's how to build wxWidgets 2.6 + stc under Microsoft Windows™ to use with MINGW32.

(NOTE: Altho Code::Blocks still can't be compiled with this version of wxWidgets, I'm posting this in advance for when it's ready. The wx2.4.2 installation instructions are very similar. They're hidden er located elsewhere in this forum)

1) Download the package (http://www.wxwidgets.org/downld2.htm) from wxwidgets.org and install. I downloaded the zip version and unzipped on a directory.

2) Make sure Your mingw gcc dir ( that's the mingw/bin directory) is in your system path (Right-click My Computer,properties, advanced options,
environment variables).

Note: This version of wxWidgets is designed to work with NATIVE win32 commands. Older versions (like 2.4.2) need the MSYS package to compile.

3) Open a Command window and change to the wxwidgets directory.
Suppose you installed in C:\wxWidgets-2.6.0:
Type:
Code: [Select]
cd {your-wxwidgets-dir}\build\msw

4)
Code: [Select]
make -f makefile.gcc SHARED=1 BUILD=release UNICODE=0
Go to dinner, watch TV and play some games while the compilation is done. [ Note: if you can't find a program called "make", try "mingw32-make" ]

5)
Code: [Select]
cd {your-wxwidgets-dir}\contrib\build\stc
make -f makefile.gcc WXUSINGDLL=1 BUILD=release SHARED=1 UNICODE=0

6)
Code: [Select]
explorer {your-wxwidgets-dir}\lib\gcc_lib
Copy everything there (subdirectories included) to your MINGW directory

7) Change directory to {your-wxwidgets-dir}\include
Copy everything there (including subdirectories) to your mingw "include" dir. NOTE: If you're still using wxwidgets 2.4.2, I suggest renaming your old "wx" dir to "wx242" so you can restore later.

8) Ta-da! You're ready to compile!
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Anonymous on April 25, 2005, 07:31:58 pm
I tryed the above but add c:\Dev-cpp\bin(on my computer but should point to mingw gcc dir) to my path since i think you forgot it in the instructions.  Make could not be found other wise. Compiled everything fine except no dll where created.  

Is this something i goof up on?

 I think it probbly becuase WXMAKINGDLL=1 might not be supported anymore but that just a guse. I ran out of time but want to try it with shared=1 like they say in documontaion.  Has any had any luck following these instruction?
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on April 25, 2005, 08:05:56 pm
Yes I did succesfully compile.. but I wanted to have a single dll :)
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on April 25, 2005, 08:44:52 pm
Thanks for the complains about the instructions. I added the modifications. Now if you want to have a single DLL, i think you have to add the MONOLITHIC=1 in the make command. (Note: Haven't tested, it tho. Read the "readme" files regarding this option)
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rahxephon on April 25, 2005, 11:50:48 pm
First thank you. This really worked for me, i have tried to compile a simple wxWidget app since some days without success.

The file setup.h in lib\gcc_dll\msw\wx I copied to include\wx. I saw somewhere that it should be done, I don't remember where and don't know if it really matters.

Quote
Copy everything there (subdirectories included) to your MINGW directory

This is what you said in step 6. But in the subdirectories only the setup.h file is there. Well i did only copy the .a and .dll files to the mingw\lib directory. I don't know if this is what you meant. You only said MINGW directory which was a bit confusing.
By the way are the .a files really necessary since we already have the .dll files?

After making a new wxWidgets projekt in Codeblocks i had to make some changes. Under Linker Options/Link libraries i deleted the existing entry. Then i added C:\MinGW\lib\wxbase26_gcc_custom.dll and C:\MinGW\lib\wxmsw26_core_gcc_custom.dll. The order here didn't matter for me. I tried both.

I also tried only wxbase26_gcc_custom.dll and wxmsw26_core_gcc_custom.dll as an entry. I added my mingw\lib directory to both the compiler and linker. This didn't work. Can someone explain why?

After successful compiling and starting the app I got an error message that the dll was not found. I simply copied the two dlls in my project directory. It  did also work to copy the dlls in some directory where the directory was included into the Environment Variable PATH.

When i looked up how to compile wxWidgets 2.6 only the 4step was described in their documentation. What does the makefile under contrib\build\stc do?

Again thank you very much. I can finally start programming with wxWidgets.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Anonymous on April 26, 2005, 04:09:37 am
OK here are the *OFFICIAL* instructions. Forget everything I posted previously.

---- (copied from the README-wx2.6.0 that will ship from now on) ---

Now that wxWidgets-2.6.0 is released, work has begun to port Code::Blocks to work with it.
Officialy, Code::Blocks still uses wxWidgets-2.4.2, until all issues from porting it to wxWidgets-2.6.0  are resolved.

KNOWN ISSUES
------------
Win32: MDI client window is not behaving correctly when maximized (initially, by code)

HOWTO build wxWidgets-2.6.0 for use with Code::Blocks
------------------------------------------------------
This process requires that you have MinGW installed. MSYS is *not* needed.
Download and decompress the wxWidgets-2.6.0 source distribution. For the rest of this small HOWTO, C:\wx2.6.0 will be assumed to be the directory wxWidgets-2.6.0 exists in.
Open a command prompt and type the following:

Code: [Select]
cd C:\wx2.6.0\build\msw
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=cb
cd ..\..\contrib\build\stc
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=cb


If all has gone well, the necessary libs and DLLs will exist in C:\wx2.6.0\lib\gcc_dll.

Copy the DLLs somewhere in your path (c:\windows\system32 is a good choice).

Open CodeBlocks-wx2.6.0.cbp with Code::Blocks and add the following search dirs:
Code: [Select]

Compiler:
C:\wx2.6.0\include
C:\wx2.6.0\contrib\include

Linker:
C:\wx2.6.0\lib\gcc_dll

Resource compiler:
C:\wx2.6.0\include

Now hit "Compile".
That's it!
Now, fix that MDI window bug ;)

REMARKS:
- If all goes well and you build Code::Blocks with wx2.6.0, but when you launch it it crashes, delete all plugins and hit "Compile" again (it will only link the plugins).
- Different object files output dirs are used for building Code::Blocks with wx2.6.0, so you can have Code::Blocks work with either wxWidgets version (2.4.2 or 2.6.0) independently.

If you have any problems, post them in the Development forum at http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewforum&f=7 (http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewforum&f=7)

Yiannis.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on April 26, 2005, 04:11:46 am
Um that was me. Forgot to log in. :oops:
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Anonymous on April 29, 2005, 04:12:25 pm
What do yuo mean MDI Bug please see
http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&p=1172#1172
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on May 03, 2005, 08:31:17 pm
When using the above instructions not every is compiled (such as OpenGL support :) or ODBC support) when you want to be able to have some special features (for compiling other programs) or remove some features (to reduce the size of the dll) you have to edit the setup.h file first.
You can find this setup.h file in the directory "<wxdir>/include/wx/msw/setup.h"
On other systems (unix, mac) you need to use the ./configure script.
Title: Wx 2.6.0 Build Error
Post by: Game_Ender on June 08, 2005, 03:26:58 pm
Sorry, if this is the wrong area to post a problem with wx 2.6.0 building, but here is my issue:  I am using CodeBlocks final beta and I followed the instruction above with only one change, I had to use "make" instead of "mingw32-make", and i got this error:

Code: [Select]
if not exist gcc_msw mkdir gcc_msw
if not exist ..\..\lib\gcc_lib\msw mkdir ..\..\lib\gcc_lib\msw
if not exist ..\..\lib\gcc_lib\msw\wx mkdir ..\..\lib\gcc_lib\msw\wx
if not exist ..\..\lib\gcc_lib\msw\wx\setup.h copy ..\..\include\wx\msw\setup.h
..\..\lib\gcc_lib\msw\wx\setup.h
        1 file(s) copied.
gcc -c -o gcc_msw\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -I..\..\inc
ude -I..\..\lib\gcc_lib\msw -D__WXMSW__    ../../src/regex/regcomp.c
In file included from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
../../src/regex/regcustom.h:39:23: wx/wxchar.h: No such file or directory

It was quite difficult to grab, becuase that is the first of what must be hundreds of errors (they scroll by with almost one every line).  My hunch is that I am using the wrong version of make, can you help me.

BTW- wxWidgets is in c:\wx, so there are no file name spaces.

EDIT- Make version - 3.77

UPDATE-
I download Mingw 3.1.0-1 and wxWidgets is now compiling, but that only uses GCC 3.2.x.  Will this compiled version of wxWidgets work wtih codeblocks? and why does this compiled with an independent Mingw install but not codeblocks?
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on June 08, 2005, 04:40:47 pm
you need Make version 3.80.0 which you can download at the mingw website. Probably it will work then.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Game_Ender on June 08, 2005, 04:49:29 pm
Thanks, it is now compiling.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on June 08, 2005, 06:47:54 pm
I am making a good story from this for wxWidgets 2.6.1, the story is like Ricks 2.4.2 compiling story. This story could come into the wiki.
I also including some suggestions for the paths and multiple builds.
Right now I am compiling codeblock with wxWidgets 2.6.1
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on June 08, 2005, 07:47:59 pm
If you like you can sign up at the wiki and start editing. Because, "it ain't called a wiki for nuthin'!" (tm) :P
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on June 08, 2005, 07:51:41 pm
I know, already done :P (a few weeks ago)
I successfully compiled codeblocks with wx2.6.1, now I should only get rid of that resource message :)
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: cyberkoa on June 08, 2005, 10:30:59 pm
Another problem solving tips .

 If you cannot compile wxwidgets-2.6.x in both MSYS or command prompt, and receive message /usr/bin/sh
blu blu blu ...

  Try to take out the C:\MSYS\1.0\bin from the path , because it default to use the /usr/bin/sh to execute all the command
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on June 09, 2005, 10:44:37 am
And here is the wiki page for it:
http://codeblocks.sourceforge.net/wiki/index.php/Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Anonymous on June 10, 2005, 08:56:31 am
Anybody try to compile codeblocks using wxwidgets-2.6.1 UNICODE ?

I have tried to compile following the official instruction with the UNICODE option change to 1 .
wxwidgets compile successfully , stc also.

CB also compiled successfully , but the linking having some problem

It seems like related to XRC because it could not find the function  ... XmlGetXRCID something like that (the error msg)

I could not post the msg now bcos I am not using my PC ..  , if anyone hv this experience hope you can share it
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: cyberkoa on June 10, 2005, 09:00:40 am
above is me , the log on time out ..
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: cyberkoa on June 10, 2005, 08:33:11 pm
I think I make mistake , I did not successfully compile the Unicode version because I just found out that I did not turn wxUSE_UNICODE on  :oops:

Now still trying...
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: DreadNot on June 11, 2005, 12:49:41 am
I compiled it OK.  The XRC (wxxrc) lib no longer exists standalone in wx2.6.0/1. Its included in the wxmsw26 lib via MONOLITHIC=1 USE_XRC=1.  Make sure your using this lib in your link, that it was compiled correctly, and your referencing the proper lib directory.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Anonymous on June 13, 2005, 04:25:34 pm
I have a problem trying to compile wxWidgets 2.6.1 with Code::Blocks/MinGW integrated package.
I always get an error telling "gcc: installation problem, cannot exec 'cc1'
What's wrong with my setup as I only installed C::B and MinGW together ?
Thanks
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 20, 2005, 03:15:50 am
I can compile 2.6.1 of wxWidgets using make & msys, but I can't do it with the mingw32-make.  When I use make, it doesn't end up in the gcc_dll directory.  I manually created those directories.  I get the following when trying to compile with mingw32-make from the command prompt:

Code: [Select]
C:\development\projects\WX_2_6_1\wxWidgets\build\msw>mingw32-make.exe -f makefil
e.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=CB

gcc -c -o gcc_mswdll\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -I..\..\i
nclude -I..\..\lib\gcc_dll\msw -D__WXMSW__    ../../src/regex/regcomp.c
process_begin: CreateProcess((null), gcc -c -o gcc_mswdll\wxregex_regcomp.o -O2
-mthreads -DHAVE_W32API_H -I..\..\include -I..\..\lib\gcc_dll\msw -D__WXMSW__ ..
/../src/regex/regcomp.c, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [gcc_mswdll\wxregex_regcomp.o] Error 2


I have make: 3.80.0-3
winXP SP2 for my windows version

So, I don't think that's the problem.  I did run a ./configure in msys first because I tried make when I got the error first.

Thank you in advance.
jmccay
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on July 20, 2005, 08:54:03 am
Are your paths setup right?
Also, is there gcc.exe in mingw's bin directory? If not copy mingw32-gcc.exe to gcc.exe. Do the same for g++.exe.
Although, I have to say, I never encountered this issue.

Yiannis.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 21, 2005, 02:42:08 am
what paths?  I can compile with make.  What paths does mingw32-gcc.exe need?  I will try moving them.  I will try and check back later--if I can find the site.
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 21, 2005, 03:21:40 am
I got it compiling.  Just incase anyone else has the problem, I will post what I had done.  When I installed mingw32-make.exe I installed it under the mingw directory, and I put that path under the path environment variable.  It didn't have all the other files.  I copied the file into the main bin directory with the other programs, and then reset the path variable to that directory.  After that I tried compiling with mingw32-make at the command prompt.  It's compiling upstairs as I type this.  We'll see if I have other problems.  I added --jobs=3 to the arguments because that should allow 3 to compile at once if possible.  Thanks for the help.  :)
jmccay
Title: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on July 21, 2005, 09:02:31 am
Quote
I added --jobs=3 to the arguments because that should allow 3 to compile at once if possible.

AFAIK this doesn't work under windows...

Yiannis.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 24, 2005, 09:19:31 pm
I did eventually find out that --jobs doesn't work without sh. Oh well. After compiling successfully, I found out I didn't have the same version of Mingw as that in the packaged version of cb. I got a compiled with different versions error.

I decided to set my path to the codeblocks bin (C:\Program Files\CodeBlocks\bin) and (C:\Program Files\CodeBlocks\mingw32\bin) and now I get a bunch of duplicate warnings similar to:

Code: [Select]
../../include/wx/string.h:58: warning: type attributes are honored only at type definition
then at the end I get stuff like this:

Code: [Select]
gcc_mswdll\basedll_archive.o(.data$_ZTI21wxArchiveClassFactory[typeinfo for wxAr
chiveClassFactory]+0x0):archive.cpp: first defined here
gcc_mswdll\basedll_zipstrm.o(.rdata$_ZTS21wxArchiveClassFactory[typeinfo name fo
r wxArchiveClassFactory]+0x0):zipstrm.cpp: multiple definition of `typeinfo name
 for wxArchiveClassFactory'

I want to make sure wxWidegts 2.6.1 with patch is compiled with the same version as CodeBlocks. Unfortunately, downloading a new version of Mingw until I get my car back from the shop. Any suggestions. Once I get everything up and running I want to help out with cb development. I like cb because of its modular design.
jmccay
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on July 24, 2005, 10:20:24 pm
   I decided to set my path to the codeblocks bin (C:\Program Files\CodeBlocks\bin) and (C:\Program Files\CodeBlocks\mingw32\bin) and now I get a bunch of duplicate warnings similar to:

Code: [Select]
../../include/wx/string.h:58: warning: type attributes are honored only at type definition

About the million warnings when compiling wx itself or a wx-based app (talking about wx2.6.1), I found that if you use gcc-3.4.4 they don't appear  :?
Previous C::B-mingw bundles provided gcc-3.4.2 IIRC. The next release, due out any time now, will contain gcc-3.4.4 so these warnings will be history, hopefully.

Yiannis.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: kagerato on July 24, 2005, 11:44:13 pm
About the million warnings when compiling wx itself or a wx-based app (talking about wx2.6.1), I found that if you use gcc-3.4.4 they don't appear  :?
Previous C::B-mingw bundles provided gcc-3.4.2 IIRC. The next release, due out any time now, will contain gcc-3.4.4 so these warnings will be history, hopefully.

Yiannis.

I was wondering what all that talk about mass warnings was about.  About two weeks ago I compiled wxWidgets with GCC 3.4.x and didn't receive any error or warning messages.  Glad that mystery is solved.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on July 25, 2005, 12:13:07 am
Speaking about wxWidgets, I think there's a problem with the templates. Static template links to wxmsw242. That'd be a big turnoff for new users.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 25, 2005, 01:44:25 am
Speaking of wxWidgets 2.6.1, there is a patch out for it. From the website:

Quote
This patch fixes the following problems on Windows:

  • Crash on exit when destroying wxCHMHelpController in wxApp::OnExit.
  • wxListBox, wxCheckListBox scrolling glitch when Windows effects are enabled.
  • Wrong area sometimes being refreshed after a window is resized.
  • Notebook refreshing the wrong area when resized.
  • Problem for non-VC++ compilers where some toolbar tooltips cause a crash.
  • An eVC++ 3 compile error.
Please download wxWidgets-2.6.1-Patch01.zip and unarchive from the top level of your wxWidgets tree.

I haven't followed all the problem issues, but if this fixes any problems you may have, down load it now.
jmccay :D
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 27, 2005, 02:58:40 am
Does RC1 (with mingw included) contain gcc-3.4.4 that allows 2.6.1 to compile without warnings?
jmccay
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on July 27, 2005, 06:07:19 pm
Does RC1 (with mingw included) contain gcc-3.4.4 that allows 2.6.1 to compile without warnings?
jmccay

Yep :)

Yiannis.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on July 31, 2005, 03:40:33 am
I uninstalled the final beta and installed RC1.  I chose not to clear the settings.  I set my path to include:

C:\Program Files\CodeBlocks\bin

My wxWidgets 2.6.1 (from CVS with the patch installed manually because it was available later) is in the this directory:

C:\development\projects\WX_2_6_1\wxWidgets

   I am still getting these warnings--endless warnings.  I can't figure out why.  It finishes compiling without errors, but I was wondering what was causing all the warning.  I get the dlls and archives.

Code: [Select]
../../include/wx/datetime.h:34: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:35: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:36: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:111: warning: type attributes are honored only at ty
pe definition
../../include/wx/datetime.h:1440: warning: type attributes are honored only at t
ype definition

jmccay
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on August 05, 2005, 01:27:07 am
I just started a new project using RC1-1 using the wxWidgets template.  I get the following linker error:

Code: [Select]
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
I don't understand why it's not finding the the wxmsw library.  What's the sepcific name of the library.  I have a "libwxmsw26.a".  I have the DLLs in both the windows/system32 directory and in the same directory as the .a the paths are all set in the search directories.  I am at a loss.  I compiled an earlier project created with the Final-Beta, and it ran.

Any suggestions?
Joe M.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on August 05, 2005, 01:49:30 am
If you have libwxmswNN.a, that means you want a Dynamically-linked wxwidgets application. There's another template for that.

After you create your project, there's a wxmsw242 in your project's linker options. change it to wxmsw26 and you're done.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on August 05, 2005, 02:04:58 am
Wow that did it--after I changed the linked library to 26.  I feel dumb.  I didn't even notice there was an option to chose static or dynamic linked libraries.  What do you need to statically link the libraries?  If I remember it's .lib.  How can I produce those if I wanted to?  Man, I wish Visual Studio taught you things like this.  It tends to hide these details from you.
  Now I am going to change the templates to reflect 26.  If I figure out how to do it, do you guys want the file(s)?
Joe M.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on August 05, 2005, 02:14:05 am
It's done and working.  I didn't test the 2.4.2 because I don't have it installed.  I just test on version.  The change was minimal.  I appended a _26 to the new file--as you will see when you get it.  It might be a good idea in the future to do something similar, and it might be possible to add platform abbreviation such as _26_msw in the future if someone has multiple target platforms.
Joe M.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on August 05, 2005, 03:03:49 am
For dynamic libraries, the .lib files are linked so the application can interface with the DLL.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 03:19:47 pm
Hello friends, I am newbei in CodeBlocks, so I can't compile wxWidgets application...
I compiled wxWidgets 2.6.1 successfully, but when I try compile in CodeBlocks "New project->wxWidgets Application", I got message "ld.exe cannot find -lwxmsw"
I have this compiler log:
+++++++++++++++++++++++++++++++++++++++++++++++
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Proj\CODEBLOCKS\wxW\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Linking executable: C:\Proj\CODEBLOCKS\wxW\wxWidgets.exe
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 0 warnings
++++++++++++++++++++++++++++++++++++++++++++++++++
I have  Code::Blocks 1.0-RC1
Please tell me what do I do wrong?
Thank you in advance.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 03:27:07 pm
oh.. I'm sorry I forgot to say...  :D
I have wxWidgets 2.6.1 installed so..  C:\wx
In Compiler Options->Directories->Compiler I added "C:\wx\include"
In Compiler Options->Directories->Linker I added "C:\wx\lib\gcc_lib"

Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on September 21, 2005, 03:44:55 pm
Just go to your project's link libraries and edit wxmsw to wxmsw261, or what have you (look for c:\wx\gcc_lib\libwxmsw261.a, for example)...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 06:18:53 pm
Thank you mandrave for your quick reply...
I am very ashamed for my dullness, but I have no "libwxmsw261.a" in "C:\wx\lib\gcc_lib" directory
and I have no one in "C:\wx" at all.
There are these files in "C:\wx\lib\gcc_lib":
libwxbase26.a
libwxbase26_net.a
libwxbase26_xml.a
libwxbase26d.a
libwxbase26d_net.a
libwxbase26d_xml.a
libwxexpat.a
libwxexpatd.a
libwxjpeg.a
libwxjpegd.a
libwxmsw26_adv.a
libwxmsw26_core.a
libwxmsw26_html.a
libwxmsw26_media.a
libwxmsw26_xrc.a
libwxmsw26d_adv.a
libwxmsw26d_core.a
libwxmsw26d_html.a
libwxmsw26d_media.a
libwxmsw26d_xrc.a
libwxpng.a
libwxpngd.a
libwxregex.a
libwxregexd.a
libwxtiff.a
libwxtiffd.a
libwxzlib.a
libwxzlibd.a

I'v done try to link every file, but had same failure.  :(
I lost myself in this issue  :( :(
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on September 21, 2005, 06:25:46 pm
AHHHHH you need to build your wxwidgets library using the MONOLITHIC=1 flag.

that would give you a single libwxmsw26.a. And if you build using SHARED=0 (besides the MONOLITHIC=1), you'll have the statically linkable libwxmsw.a.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on September 21, 2005, 06:50:18 pm
You haven't built it as monolithic.
To link the sample code with your library, add all libwxmsw26_*.a files in the link libraries.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 08:10:49 pm
Thank you rickg22, thank you mandrav, I'm sorry, I recolmpiled all... I have libwxmsw26.a now (C:\wx\lib\gcc_lib\libwxmsw26.a), I'v set 
Settings->Compiler->Linker->Link libraries = C:\wx\lib\gcc_lib\libwxmsw26.a
but I get "ld.exe: cannot find -lwxmsw"-message... else and else :(  :( :(
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on September 21, 2005, 08:23:23 pm
Thank you rickg22, thank you mandrav, I'm sorry, I recolmpiled all... I have libwxmsw26.a now (C:\wx\lib\gcc_lib\libwxmsw26.a), I'v set
Settings->Compiler->Linker->Link libraries = C:\wx\lib\gcc_lib\libwxmsw26.a
but I get "ld.exe: cannot find -lwxmsw"-message... else and else :( :( :(


Settings->Compiler->Linker->Link libraries  is the global compiler options.
You should look in "Project->Build options" for the project-wide and per-target compiler/linker options.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 08:38:23 pm
 :( I'v done in "Project->Build options" now, I added in Linker->Link libraries = ..\..\..\wx\lib\gcc_lib\libwxmsw26.a (and relative and not)
Directories->Compiler = C:\wx\include (and relative and not)
Directories->Linker = C:\wx\lib\gcc_lib (and relative and not)
but I have same issue, it's something witchcraft  :( :( :( :(
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on September 21, 2005, 08:59:32 pm
Can you post the errors please?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 09:04:53 pm
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Proj\CODEBLOCKS\wxW\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Linking executable: C:\Proj\CODEBLOCKS\wxW\wxWidgets.exe
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 4 seconds)
1 errors, 0 warnings
 
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on September 21, 2005, 09:22:33 pm
You 're still having wxmsw as a link library.
I told you before: replace it by wxmsw26...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 21, 2005, 09:31:40 pm
I have only libwxmsw26.a and added already it everywhere....
Project->Build options->Linker = C:\wx\lib\gcc_lib\libwxmsw26.a (both wxWidgets Application and default)
Project->Build options->Directories->Compiler = C:\wx\include (both wxWidgets Application and default)
Project->Build options->Directories->Linker = C:\wx\lib\gcc_lib (both wxWidgets Application and default)

:( I don't know where should I add libwxmsw26.a else? :(
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on September 21, 2005, 11:54:17 pm
We'd appreciate it if you deleted your previous 3 "doesn't work" comments that you posted after our answers :lol:
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on September 22, 2005, 09:10:20 am
:) Thank you mandrav, thank you rickg22, you really help me  :) I fixed problem....  :)
I fogot delete "wxmsw" entry in Project->Build options->Linker string.......
now it's OK  :)
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on September 30, 2005, 01:08:47 am
I messed with my setup & I cannot figure out what is wrong.  Does anyone have any ideas what could cause this?


Code: [Select]
$ mingw32-make -f ./makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release
UNICODE=0 VENDOR=cb
if not exist gcc_mswdll mkdir gcc_mswdll
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\Program Files\CodeBlocks\bin\mingw32-make.exe: [gcc_mswdll] Error 258 (ignored)
if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\Program Files\CodeBlocks\bin\mingw32-make.exe: *** [..\..\lib\gcc_dll\msw] Error 258

   I am answering my own question before I  post it in case someone else has a momentary lapse of intelligence and doesn't read the installation.  the the makefile.gcc doesn't work under msys.  It's for mingw using the windows command prompt.  :P

joe
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Serge2005 on October 02, 2005, 09:38:44 am
Hello joe, try to compile separate MinGW's compilator... or without empty space in compiler's path (NOT c:\Program Files).
I compiled in MinGW successfully but without "./" i.e.  mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: thomas on October 02, 2005, 01:14:47 pm
... or without empty space in compiler's path (NOT c:\Program Files)
This is 99.99% certain the problem.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on October 12, 2005, 02:23:50 am
... or without empty space in compiler's path (NOT c:\Program Files)
This is 99.99% certain the problem.

Actually, my problem was that I was trying to use msys to compile it, and it clearly says in the instructions to compile using the makefile under windows that it will not work with msys.
joe
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on October 12, 2005, 11:28:08 am
hehe, no that isn't going to work :lol: was it so unclear that you didn't have to use msys?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on October 22, 2005, 09:02:55 pm
I uninstalled the final beta and installed RC1.  I chose not to clear the settings.  I set my path to include:

C:\Program Files\CodeBlocks\bin

My wxWidgets 2.6.1 (from CVS with the patch installed manually because it was available later) is in the this directory:

C:\development\projects\WX_2_6_1\wxWidgets

   I am still getting these warnings--endless warnings.  I can't figure out why.  It finishes compiling without errors, but I was wondering what was causing all the warning.  I get the dlls and archives.

Code: [Select]
../../include/wx/datetime.h:34: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:35: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:36: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:111: warning: type attributes are honored only at ty
pe definition
../../include/wx/datetime.h:1440: warning: type attributes are honored only at t
ype definition

jmccay

  I finally have an answer to this question.  Here is the answer from the wxWidgets forum:

the warnings are because the makefile turned all warnings on... you can easily edit it at ur wishes
-lowjoel (Moderator wxWidgets forum) http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=3324&start=0&postdays=0&postorder=asc&highlight=&sid=12dc997430a4cb2bc99f0175699f58de

Anybody know how to turn off that particular warning with turning them all off?  I edited the installation wiki to make note of that comment incase someone new wants to know why it's happening.

jmccay
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: takeshi miya on October 22, 2005, 11:07:59 pm
I've read somewhere that this was a bug in a specific version of GCC, but I have a newer version, and I still get those warnings. :?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: thomas on October 22, 2005, 11:38:57 pm
The problem is that they use __declspec(dllexport) instead of  __attribute__ ((dllexport)) in the MinGW parts of the includes, which is not MinGW syntax.

For compatibility's sake, MinGW treats __declspec(dllexport) as an alias for __attribute__ ((dllexport)), but in a few builds, it does not work correctly and produces that warning.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: pir on October 25, 2005, 04:24:56 pm
Very valuable thread! It actually provides much more useful information than the wxWidgets site - the instructions that come with wxWidgets v2.6.2 don't seem to work (for me!) since there is no mention of the flags that seem to be essential.

Unfortunately, it's a bit confusing trying to extract a definitive set of instructions for the latest wxWidgets version from this thread. Is it possible for some kindly soul to post an up-to-date set of instructions for building both a static and dynamic link libraries? And to explain what all the flags do? MinGW is the compiler I use although I'm sure others would be valued too. (Is the wiki an appropriate repository for such an invaluable piece of information?)

Cheers,
Peter
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on October 25, 2005, 04:30:38 pm
Yes the wiki should used for this.
Also I am (still) working on my computer to get linux working. Because I have noticed that is the easiest platform to create multiple kinds of documentation (probably not through, but that is what I found out) So as soon as that is done, I am able to start some write some documentation.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: pir on October 25, 2005, 04:39:37 pm
Ooops! Just noticed that there are instructions for wxWidgets v2.6.1 on the wiki!! Just that it's 'hidden' under the 'Tutorials' section.

See http://wiki.codeblocks.org/index.php/Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29

Peter
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: jmccay on October 27, 2005, 03:24:42 am
What are the "Settings->Compiler->Directories->Resource compiler" for?  What directories do I want to make available here?

Thank you.
jmccay
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on October 27, 2005, 04:35:54 am
The resource compiler directories are used to include your windows resources (bitmaps, icons, etc) in the executable. The wxWidgets for example, has a resource file including an icon. In any case, follow the rule:
If you don't know it, you don't need it :P
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: S_O on December 02, 2005, 08:35:19 pm
I messed with my setup & I cannot figure out what is wrong.  Does anyone have any ideas what could cause this?


Code: [Select]
$ mingw32-make -f ./makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release
UNICODE=0 VENDOR=cb
if not exist gcc_mswdll mkdir gcc_mswdll
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\Program Files\CodeBlocks\bin\mingw32-make.exe: [gcc_mswdll] Error 258 (ignored)
if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\Program Files\CodeBlocks\bin\mingw32-make.exe: *** [..\..\lib\gcc_dll\msw] Error 258

   I am answering my own question before I  post it in case someone else has a momentary lapse of intelligence and doesn't read the installation.  the the makefile.gcc doesn't work under msys.  It's for mingw using the windows command prompt.  :P

joe

I currently have exactly the same problem. I tried in msys and normal command prompt, exactly the same error message. What am I doing wrong? I have mingw-4.1, msys 1.0.10, Windows XP, wxWidgets 2.6.2
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: rickg22 on December 02, 2005, 10:23:29 pm
the windows version of wxWidgets must _NOT_ be compiled inside MSYS. See the wiki for details.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: David Perfors on December 02, 2005, 10:38:25 pm
it is possible to compile with msys, but than you have to use the linux method: ./configure && make
But it is easier to use the command prompt of windows.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: S_O on December 03, 2005, 01:03:22 am
I read the wiki and I used command prompt.
But normal command prompt gives me exactly the same error message as msys:
Code: [Select]
C:\wxWidgets-2.6.2\build\msw>C:\msys\1.0\bin\make -f makefile.gcc USE_XRC=1 SHAR
ED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxpng.a del ..\..\lib\gcc_dll\libwxpng.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxjpeg.a del ..\..\lib\gcc_dll\libwxjpeg.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxtiff.a del ..\..\lib\gcc_dll\libwxtiff.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxexpat.a del ..\..\lib\gcc_dll\libwxexpat.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw26
u_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u.a del ..\..\lib\gcc_dll\libwxmsw26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u.a del ..\..\lib\gcc_dll\libwxmsw26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase
26u_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u.a del ..\..\lib\gcc_dll\libwxbase26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u.a del ..\..\lib\gcc_dll\libwxbase26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_net_gcc_custom.dll del ..\..\lib\gcc_dll\wx
base26u_net_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_net.a del ..\..\lib\gcc_dll\libwxbase26u
_net.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_net.a del ..\..\lib\gcc_dll\libwxbase26u
_net.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_core_gcc_custom.dll del ..\..\lib\gcc_dll\wx
msw26u_core_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_core.a del ..\..\lib\gcc_dll\libwxmsw26u_
core.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_core.a del ..\..\lib\gcc_dll\libwxmsw26u_
core.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_adv_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw26u_adv_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_adv.a del ..\..\lib\gcc_dll\libwxmsw26u_a
dv.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_adv.a del ..\..\lib\gcc_dll\libwxmsw26u_a
dv.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_media_gcc_custom.dll del ..\..\lib\gcc_dll\w
xmsw26u_media_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_media.a del ..\..\lib\gcc_dll\libwxmsw26u
_media.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_media.a del ..\..\lib\gcc_dll\libwxmsw26u
_media.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_odbc_gcc_custom.dll del ..\..\lib\gcc_dll\w
xbase26u_odbc_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_odbc.a del ..\..\lib\gcc_dll\libwxbase26
u_odbc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_odbc.a del ..\..\lib\gcc_dll\libwxbase26
u_odbc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_dbgrid_gcc_custom.dll del ..\..\lib\gcc_dll\
wxmsw26u_dbgrid_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_dbgrid.a del ..\..\lib\gcc_dll\libwxmsw26
u_dbgrid.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_dbgrid.a del ..\..\lib\gcc_dll\libwxmsw26
u_dbgrid.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_html_gcc_custom.dll del ..\..\lib\gcc_dll\wx
msw26u_html_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_html.a del ..\..\lib\gcc_dll\libwxmsw26u_
html.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_html.a del ..\..\lib\gcc_dll\libwxmsw26u_
html.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_qa_gcc_custom.dll del ..\..\lib\gcc_dll\wxms
w26u_qa_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_qa.a del ..\..\lib\gcc_dll\libwxmsw26u_qa
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_qa.a del ..\..\lib\gcc_dll\libwxmsw26u_qa
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_xml_gcc_custom.dll del ..\..\lib\gcc_dll\wx
base26u_xml_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_xml.a del ..\..\lib\gcc_dll\libwxbase26u
_xml.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_xml.a del ..\..\lib\gcc_dll\libwxbase26u
_xml.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_xrc_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw26u_xrc_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_xrc.a del ..\..\lib\gcc_dll\libwxmsw26u_x
rc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_xrc.a del ..\..\lib\gcc_dll\libwxmsw26u_x
rc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_gl_gcc_custom.dll del ..\..\lib\gcc_dll\wxms
w26u_gl_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_gl.a del ..\..\lib\gcc_dll\libwxmsw26u_gl
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_gl.a del ..\..\lib\gcc_dll\libwxmsw26u_gl
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
/usr/bin/make -C ..\..\samples -f makefile.gcc CC="gcc" CXX="g++" CFLAGS="" CXXF
LAGS="" CPPFLAGS="" LDFLAGS="" SHARED="1" WXUNIV="0" UNICODE="1" MSLU="0" BUILD=
"release" DEBUG_INFO="default" DEBUG_FLAG="default" MONOLITHIC="1" USE_GUI="1" U
SE_HTML="1" USE_XRC="1" USE_OPENGL="0" USE_ODBC="0" USE_QA="0" USE_EXCEPTIONS="1
" USE_RTTI="1" USE_THREADS="1" OFFICIAL_BUILD="0" VENDOR="custom" WX_FLAVOUR=""
WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_LIBS="dynamic
" GCC_VERSION="3" clean
make: *** ....samples: No such file or directory.  Stop.
make: *** [clean] Error 2
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Urxae on December 03, 2005, 01:17:39 am
I read the wiki and I used command prompt.
But normal command prompt gives me exactly the same error message as msys:
Code: [Select]
C:\wxWidgets-2.6.2\build\msw>C:\msys\1.0\bin\make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
[...]

You're still using the MSYS make. Don't do that, use the one that comes with MinGW (mingw32-make).
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: S_O on December 03, 2005, 01:35:38 pm
You're still using the MSYS make. Don't do that, use the one that comes with MinGW (mingw32-make).
I yust downloaded mingw32-make (http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download) and tried again, now the error is a little bit different:
Code: [Select]
C:\wxWidgets-2.6.2\build\msw>c:\mingw\bin\mingw32-make -f makefile.gcc USE_XRC=1
 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\mingw\bin\mingw32-make: [clean] Error 258 (ignored)
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\mingw\bin\mingw32-make: [clean] Error 258 (ignored)
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\mingw\bin\mingw32-make: [clean] Error 258 (ignored)
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a

....

c:/mingw/bin/mingw32-make -C ..\..\samples -f makefile.gcc CC="gcc" CXX="g++" CF
LAGS="" CXXFLAGS="" CPPFLAGS="" LDFLAGS="" SHARED="1" WXUNIV="0" UNICODE="1" MSL
U="0" BUILD="release" DEBUG_INFO="default" DEBUG_FLAG="default" MONOLITHIC="1" U
SE_GUI="1" USE_HTML="1" USE_XRC="1" USE_OPENGL="0" USE_ODBC="0" USE_QA="0" USE_E
XCEPTIONS="1" USE_RTTI="1" USE_THREADS="1" OFFICIAL_BUILD="0" VENDOR="custom" WX
_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_L
IBS="dynamic" GCC_VERSION="3" clean
c:\mingw\bin\mingw32-make.exe: *** ....samples: No such file or directory.  Stop
.
c:\mingw\bin\mingw32-make: *** [clean] Error 2
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on December 03, 2005, 01:46:19 pm
People here are trying to tell you that you must not use MSYS at all.
Downloading only make, is not going to help you. You 're still using GCC from MSYS...

If you want to use makefiles to build it, you *must* not use MSYS.
To use MSYS, try the "./configure" approach.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: S_O on December 03, 2005, 02:31:57 pm
People here are trying to tell you that you must not use MSYS at all.
Downloading only make, is not going to help you. You 're still using GCC from MSYS...

If you want to use makefiles to build it, you *must* not use MSYS.
To use MSYS, try the "./configure" approach.
Im not using MSYS at all (at least not knowingly).
Is it impossible to compile wxWidgets with MSYS installed (installed, not used)? How do I compile it without using MSYS? I use command-prompt, but probably it still uses all the MSYS tools.
Also the problem seems to be the sh.exe.The sh.exe is only part of MSYS, not of my MinGW installation. GCC is in MinGW and MSYS.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly on December 03, 2005, 03:42:29 pm
How do I compile it without using MSYS?
You have MSYS in your PATH environment set before the path that holds the mingw-make. So eighter you fix your PATH environment to first point to the path with mingw-make or (more secure) just rename the MSYS folder for the time compiling wxWidgets.

Morten.

Ps: Of course you can also just remove the MSYS entry in your PATH - I am using MSYS myself and I don't need this to be in the PATH at all.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Lamego on December 03, 2005, 04:03:47 pm
You do not need to install MSYS to compile wxWidgets, if you have installed codeblocks+mingw it already includes everything thats needed.
Just grab the wxMSW source and extract it to C:\wxWidgets-2.6.2 (us this path if you dont want to touch the wxwidgets template later).

Now from a command prompt window type :
PATH=%PATH%;C:\Program Files\CodeBlocks\bin

cd \wxWidgets-2.6.2\build\msw
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb

This will build a codeblocks ready MSW .
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: S_O on December 03, 2005, 04:31:18 pm
MSYS wasnt the problem: WinAVR (a AVR-RISC-Microcontroller-IDE also containing special versions of make and gcc) was the problem. After renaming the winavr-folder it worked. Currently wxWidgets is compiling  :D

Edit:
Compiling is complete, I created a new wxWidgets-Project, but project refuses compiling:
Code: [Select]
main.cpp:24: error: call of overloaded `wxMenu(const char[1])' is ambiguous
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:122: note: candidates are: wxMenu::wxMenu(const wxMenu&) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:59: note:                 wxMenu::wxMenu(long int) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:57: note:                 wxMenu::wxMenu(const wxString&, long int) <near match>
main.cpp:28: error: call of overloaded `wxMenu(const char[1])' is ambiguous
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:122: note: candidates are: wxMenu::wxMenu(const wxMenu&) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:59: note:                 wxMenu::wxMenu(long int) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:57: note:                 wxMenu::wxMenu(const wxString&, long int) <near match>
Process terminated with status 1 (0 minutes, 0 seconds)
After outcommenting the code it compiles fine. Is it a bug in CodeBlocks or is something with my installtion wrong?
Also is there any better solution for the wxWidgets library: Even the smallest Programm needs this 10MB dll. Can I compile it somehow different that it only includes the suff I need directly in the exe (SHARED=0 MONOLITHIC=0) or more dlls (SHARED=1 MONOLITHIC=0)?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Gregorius on January 30, 2006, 09:44:03 pm
Anytime I try to compile I get this error:
Code: [Select]
C:\Dev\wxWidgets-2.6.2\build\msw>mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb
if not exist gcc_mswdll mkdir gcc_mswdll
Syntax error: end of file unexpected (expecting "then")
mingw32-make: [gcc_mswdll] Error 2 (ignored)
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
Syntax error: end of file unexpected (expecting "then")
mingw32-make: *** [..\..\lib\gcc_dll] Error 2
CodeBlocks 1.0rc2
wxWidgets 2.6.2

Exactly the same error I get if I use MinGW or make downloaded separately.
I even tried with MSYS - exactly the same...

Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: frozon on January 31, 2006, 03:31:28 am
Hi,
I just tried to compil wxwidgets 2.6.2 with this command line:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=cb WXUNIV=1
It works, but when i lunch code::blocks, set the different path i have an error message
here is the log:
Code: [Select]
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : E:\Documents and Settings\Administrator\My Documents\dev\PAC\
--------------------------------------------------------------------------------
Switching to target: default
Precompiling header: wx_pch.h
In file included from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/defs.h:21,
                 from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:11:
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/platform.h:190:22: wx/setup.h: No such file or directory
In file included from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/platform.h:258,
                 from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/defs.h:21,
                 from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:11:
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:84:9: #error "wxUSE_DYNLIB_CLASS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:100:9: #error "wxUSE_FILESYSTEM must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:121:9: #error "wxUSE_LOG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:129:9: #error "wxUSE_LONGLONG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:219:9: #error "wxUSE_SOCKETS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:227:9: #error "wxUSE_STREAMS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:251:9: #error "wxUSE_TEXTFILE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:285:9: #error "wxUSE_ACCEL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:293:9: #error "wxUSE_BMPBUTTON must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:301:9: #error "wxUSE_BUTTON must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:309:9: #error "wxUSE_CALENDARCTRL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:317:9: #error "wxUSE_CARET must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:325:9: #error "wxUSE_CHECKBOX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:341:9: #error "wxUSE_CHOICE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:349:9: #error "wxUSE_CHOICEBOOK must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:357:9: #error "wxUSE_CHOICEDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:365:9: #error "wxUSE_CLIPBOARD must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:373:9: #error "wxUSE_COLOURDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:381:9: #error "wxUSE_COMBOBOX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:389:9: #error "wxUSE_DATAOBJ must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:397:9: #error "wxUSE_DATEPICKCTRL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:405:9: #error "wxUSE_DISPLAY must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:413:9: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:421:9: #error "wxUSE_FILEDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:429:9: #error "wxUSE_FONTDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:437:9: #error "wxUSE_FONTMAP must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:445:9: #error "wxUSE_GAUGE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:453:9: #error "wxUSE_GRID must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:461:9: #error "wxUSE_HELP must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:469:9: #error "wxUSE_HTML must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:477:9: #error "wxUSE_XRC must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:498:9: #error "wxUSE_ICO_CUR must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:506:9: #error "wxUSE_IFF must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:514:9: #error "wxUSE_IMAGLIST must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:522:9: #error "wxUSE_JOYSTICK must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:530:9: #error "wxUSE_LISTBOOK must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:538:9: #error "wxUSE_LISTBOX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:546:9: #error "wxUSE_LISTCTRL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:554:9: #error "wxUSE_LOGGUI must be defined."
Process terminated with status 1 (0 minutes, 5 seconds)

I don't understand the problem, if someone could help me please.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: AkiraDev on January 31, 2006, 01:43:36 pm
The Code::Blocks project is configured to use a Unicode wxWidgets library, while your wxWidgets has been compiled as ANSI (UNICODE=0).

You need to either:

Adapt your project build options for ANSI...
- Remove the wxUSE_UNICODE define
- Change the custom variable WX_SUFFIX from 'u' to an empty string

... or recompile wxWidgets as Unicode (UNICODE=1).
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on January 31, 2006, 03:01:04 pm
And please don't use "VENDOR=cb". It is wrong to use it. I have removed it from the wiki for some time now. If you saw it there, please tell me where so I can remove it...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: killerbot on January 31, 2006, 03:39:05 pm
And please don't use "VENDOR=cb". It is wrong to use it. I have removed it from the wiki for some time now. If you saw it there, please tell me where so I can remove it...

Yiannis,
How come CB still need the wxmsw26u_gcc_cb.dll then ?


Lieven
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on January 31, 2006, 03:49:38 pm
Yiannis,
How come CB still need the wxmsw26u_gcc_cb.dll then ?

The vendor suffix is there so you know where you got your DLL from. If everyone creates wxmsw26u_gcc_cb.dll, then how would you tell if it's our "official" release or not?
If you ommit the vendor part, it creates wxmsw26u_gcc_custom.dll which works just fine without altering one thing...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: killerbot on January 31, 2006, 03:52:36 pm
recap (did not read the entire thread), if you create your own wx programs : use a non vendor=cb wx builded dll.
when using cb (official, nightly, your own CB build) : vendor =cb builded dll ??

is this correct ?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav on January 31, 2006, 03:58:48 pm
recap (did not read the entire thread), if you create your own wx programs : use a non vendor=cb wx builded dll.
when using cb (official, nightly, your own CB build) : vendor =cb builded dll ??

is this correct ?

In other, more specific, words: "VENDOR=cb" must only be used by C::B devs creating releases (official or nightlies).
Nobody else should use it.
It doesn't change anything anyway, other than the DLL's name. This means that the same project file can be used to build a wx app regardless of the vendor setting...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Gregorius on January 31, 2006, 05:27:08 pm
Can anybody help me with my "stupid" error?
Anytime I try to build wxWidgets I get exactly the same "syntax error"...
Even without any additional option:
Code: [Select]
C:\Dev\wxWidgets-2.6.2\build\msw>mingw32-make -f makefile.gcc
if not exist gcc_mswd mkdir gcc_mswd
Syntax error: end of file unexpected (expecting "then")
C:\dev\CodeBlocks\bin\mingw32-make: [gcc_mswd] Error 2 (ignored)
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
Syntax error: end of file unexpected (expecting "then")
C:\dev\CodeBlocks\bin\mingw32-make: *** [..\..\lib\gcc_lib] Error 2
What am I doing wrong?  :?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: killerbot on January 31, 2006, 06:00:55 pm
do first mingw32-make --version (should be 3.80), just too make sure
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: sethjackson on January 31, 2006, 06:06:55 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: AkiraDev 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Gregorius 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 :(
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: mandrav 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"...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Gregorius 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Michael 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Gregorius 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 :)
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Michael 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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 (http://www/wwrinc.com/pictures/cbWarning.jpg) 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]
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon on February 23, 2006, 06:10:05 pm
Firstly, I highly recommend upgrading to one of the Nightly builds which can be found here (http://forums.codeblocks.org/index.php?board=20.0). 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:

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).
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon 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 (http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29) 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Michael 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly 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]
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Michael 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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



Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly 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?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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   
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly 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.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon 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.)
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly 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?!
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend 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

Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: AkiraDev on February 24, 2006, 07:16:25 pm
Assuming you used the C::B project wizard for wxWidgets apps, did you choose dynamic (DLL) or static linking in the dialog?

In case you chose "static" there may be a small bug in the prototype project file: it is incorrectly stating the linker working directory as $(WX_DIR)\lib\gcc_dll instead of $(WX_DIR)\lib\gcc_lib. Correct this and it should link fine.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon on February 24, 2006, 07:35:27 pm
Assuming you didn't use the included wxWidgets project template, create one and compare. There are three different configuration locations that need to match up:
You must always have <wxwidgets>\include in your include paths.
You must also always have a configuration specific include path. If you're building with Windows DLL NON-unicode, it's <wxwidgets>\lib\<configuration>\msw; if you're building with Windows DLL Unicode, it's <wxwidgets>\lib\<configuration>\mswu.

If you're building for Windows, you must have "__WXMSW__", defined, and should have "HAVE_W32API_H" defined.
If you're building with the DLL, you must have "WXUSINGDLL" defined.
If you're building with the Unicode version, you must have "wxUSE_UNICODE" defined.

If you're building with the Windows DLL NON-Unicode, you must link with wxmsw26; if you're building with the Windows DLL Unicode, you must link with wxmsw26u.

As I mentioned before, all this is taken care of for you with the wxWidgets project template included with Code::Blocks. All you would need to change would be the paths with "gcc_dll" in them, if that isn't the name of your wxWidgets configuration (in the lib subdirectory). (And, if you're like me, delete the precompiled header.)
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: wittend on February 24, 2006, 09:36:19 pm
Quote
If you're building for Windows, you must have "__WXMSW__", defined, and should have "HAVE_W32API_H" defined.
...
If you're building with the Unicode version, you must have "wxUSE_UNICODE" defined.

Thanks! This worked! I needed "HAVE_W32API_H" and/or "wxUSEUNICODE", did a clean, & then the build worked.  I really appreciate the help from everyone!

-- dave
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly on February 24, 2006, 09:45:20 pm
Thanks! This worked! I needed "HAVE_W32API_H" and/or "wxUSEUNICODE", did a clean, & then the build worked.  I really appreciate the help from everyone!
Great news! ;-)
Well, I wonder if this information should be put into the WiKi then. It seems worth it.
TDragon: Will you take the chance?
Morten.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon on February 24, 2006, 10:40:26 pm
Maybe one of these days when I'm feeling documentative. :lol:

Come to think of it, I probably don't have modification rights on the CBwiki.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Michael on February 25, 2006, 04:10:59 pm
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.

Thank you for your answer :). Yes, I have lost the debug toolbar and the todo list tab below. If I am not wrong we are until now 3 persons having tried 2.6.3-RC1 and having had layout problems. Takeshi Miya pointed me to a possible solution. I will give it a try ASAP.

Best wishes,
Michael
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly on February 25, 2006, 04:35:54 pm
Come to think of it, I probably don't have modification rights on the CBwiki.
You have to register before -> just as for the forum. Did you do that?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: TDragon on February 25, 2006, 06:08:30 pm
No, not yet. :)
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: macwolf on March 23, 2006, 08:37:31 am
I can't compile any wxWidgets program. Output is:
D:/CodeBlocks/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
D:/CodeBlocks/include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
D:/CodeBlocks/include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
D:/CodeBlocks/include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
D:/CodeBlocks/include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
D:/CodeBlocks/include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
D:/CodeBlocks/include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
D:/CodeBlocks/include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
D:/CodeBlocks/include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:293:9: #error "wxUSE_BMPBUTTON must be defined."
D:/CodeBlocks/include/wx/chkconf.h:301:9: #error "wxUSE_BUTTON must be defined."
D:/CodeBlocks/include/wx/chkconf.h:309:9: #error "wxUSE_CALENDARCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:349:9: #error "wxUSE_CHOICEBOOK must be defined."
D:/CodeBlocks/include/wx/chkconf.h:357:9: #error "wxUSE_CHOICEDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:373:9: #error "wxUSE_COLOURDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:389:9: #error "wxUSE_DATAOBJ must be defined."
D:/CodeBlocks/include/wx/chkconf.h:397:9: #error "wxUSE_DATEPICKCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:405:9: #error "wxUSE_DISPLAY must be defined."
D:/CodeBlocks/include/wx/chkconf.h:421:9: #error "wxUSE_FILEDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:429:9: #error "wxUSE_FONTDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:437:9: #error "wxUSE_FONTMAP must be defined."
D:/CodeBlocks/include/wx/chkconf.h:477:9: #error "wxUSE_XRC must be defined."
D:/CodeBlocks/include/wx/chkconf.h:498:9: #error "wxUSE_ICO_CUR must be defined."
D:/CodeBlocks/include/wx/chkconf.h:506:9: #error "wxUSE_IFF must be defined."
D:/CodeBlocks/include/wx/chkconf.h:514:9: #error "wxUSE_IMAGLIST must be defined."
D:/CodeBlocks/include/wx/chkconf.h:522:9: #error "wxUSE_JOYSTICK must be defined."
D:/CodeBlocks/include/wx/chkconf.h:530:9: #error "wxUSE_LISTBOOK must be defined."
D:/CodeBlocks/include/wx/chkconf.h:546:9: #error "wxUSE_LISTCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:554:9: #error "wxUSE_LOGGUI must be defined."
D:/CodeBlocks/include/wx/chkconf.h:562:9: #error "wxUSE_LOGWINDOW must be defined."
D:/CodeBlocks/include/wx/chkconf.h:570:9: #error "wxUSE_LOG_DIALOG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:578:9: #error "wxUSE_MDI must be defined."
D:/CodeBlocks/include/wx/chkconf.h:594:9: #error "wxUSE_MENUS must be defined."
D:/CodeBlocks/include/wx/chkconf.h:602:9: #error "wxUSE_MSGDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:618:9: #error "wxUSE_PALETTE must be defined."
D:/CodeBlocks/include/wx/chkconf.h:626:9: #error "wxUSE_POPUPWIN must be defined."
D:/CodeBlocks/include/wx/chkconf.h:682:9: #error "wxUSE_SOUND must be defined."
D:/CodeBlocks/include/wx/chkconf.h:706:9: #error "wxUSE_SPLASH must be defined."
D:/CodeBlocks/include/wx/chkconf.h:714:9: #error "wxUSE_SPLITTER must be defined."
D:/CodeBlocks/include/wx/chkconf.h:722:9: #error "wxUSE_STATBMP must be defined."
D:/CodeBlocks/include/wx/chkconf.h:730:9: #error "wxUSE_STATBOX must be defined."
D:/CodeBlocks/include/wx/chkconf.h:746:9: #error "wxUSE_STATTEXT must be defined."
D:/CodeBlocks/include/wx/chkconf.h:762:9: #error "wxUSE_TAB_DIALOG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:770:9: #error "wxUSE_TEXTCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:778:9: #error "wxUSE_TIPWINDOW must be defined."
D:/CodeBlocks/include/wx/chkconf.h:802:9: #error "wxUSE_TREECTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:818:9: #error "wxUSE_WXHTML_HELP must be defined."
D:/CodeBlocks/include/wx/chkconf.h:909:13: #error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
D:/CodeBlocks/include/wx/chkconf.h:939:9: #error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"

Did anyone had the same problem?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly on March 23, 2006, 09:08:37 am
I can't compile any wxWidgets program. Output is:
The includes are incorrect. Please post the full command line log (to be enabled int he compiler settings) so we can help you. You may want to use a wxWidgets template that ships with C::B, too.
With regards, Morten.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: thomas on March 23, 2006, 09:51:02 am
I can't compile any wxWidgets program. Output is:
D:/CodeBlocks/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
[...]
Such messages appear for example if the setup.h file (normally found in include/wx/msw) which you include is not compatible with your wxWidgets build or is missing alltogether.

How could  it be missing, the compiler would throw an error, you ask? No, you do not necessarily get an error message, since there is usually another setup.h (completely unrelated) in your include dirs, and the compiler will use that one if it does not find the correct one.

Make sure that the include paths are properly set up. The easiest and most foolproof way is to do it as we do in the Code::Blocks build and which is assumed for the templates too: keep wxWidgets in one place (don't copy headers to D:/CodeBlocks/include/ like you did). Unzip it to some arbitrary location. Configure it there, compile it there, leave it there. Don't touch anything afterwards.
Then make a variable or global user variable (if you're using a recent build) pointing to the wx directory, and add $YOURVARIABLE/lib/gcc_dll/msw and $YOURVARIABLE/include to the top of compiler includes. If you use several builds (unicode / non-unicode, for example), you can use a second variable to distinguish builds, too.
That way, everything works, it is foolproof, and you can switch versions painlessly.

Please post the full command line log (to be enabled int he compiler settings) so we can help you.
Yes, that, and the version.
Whenever reporting any kind of problem, please always provide the exact program revision and the full build commandline. The best thing to do (if you have a recent build) is to click on the revision string in the "start here" page. That copies the revision information to the clipboard. Paste it as the first line of your post.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: macwolf on March 23, 2006, 02:48:54 pm

I'm using Code::Blocks v1.0,WxWidgets 2.6.2, makefile done with gcc 3.9.0
trying to compile template from Code::Blocks.


I've tried to change path directly to Widgets installed on other drive:
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodeBlocks\widegt\
--------------------------------------------------------------------------------
mingw32-g++.exe -LC:/wxWidgets-2.6.2/lib/gcc_dll -LD:/CodeBlocks/lib -o D:/CodeBlocks/widegt/wxWidgets.exe .objs/main.o     -lwxmsw26 C:\wxWidgets-2.6.2\lib\gcc_dll\libwxregexu.a -mwindows
D:\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26
collect2: ld returned 1 exit status
make.exe: *** [D:/CodeBlocks/widegt/wxWidgets.exe] Error 1
Process terminated with status 1 (0 minutes, 2 seconds)

Build message:  ld.exe cannot find  -lwxmsw26

Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly on March 23, 2006, 03:26:19 pm
mingw32-g++.exe -LC:/wxWidgets-2.6.2/lib/gcc_dll
Build message:  ld.exe cannot find  -lwxmsw26
Why do you use forward slashes? This could be a problem. Furthermore: Is your wxWidgtes SDK really installed in C:/wxWidgets-2.6.2? This very much looks like a default value to me.
With regards, Morten.

Edit: BTW: You know that to compile a wxWidgets application you need the wxWidgets SDK (headers and libs) too, right? They not ship with C::B but have to be installed (and compiled) separately.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: tiwag on March 23, 2006, 03:27:59 pm
the forward slashes don't harm
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: MortenMacFly on March 23, 2006, 03:28:55 pm
the forward slashes don't harm
Alright, but if there is no wxWidgets at this place this would harm. ;-)
With regards, Morten.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Michael on March 23, 2006, 03:41:51 pm
I'm using Code::Blocks v1.0,WxWidgets 2.6.2, makefile done with gcc 3.9.0
trying to compile template from Code::Blocks.

GCC 3.9.0 :?? In Windows? AFAIK there is a candidate GCC 3.4.5 (If we exclude Ceniza's GCC 4.1.0), but 3.9.0 no. In Linux there is a GCC 3.9.0.

Best wishes,
Michael
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: macwolf on March 23, 2006, 03:56:28 pm

 Yop they're there... ( it is default, i just want to know if it works proprerly)
  ( comilation for MS Visual .NET 2003 works fine, though i'd rather use gcc..)
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: macwolf on March 23, 2006, 03:57:53 pm



GCC 3.4.4 sorry for misleading number...
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Vlad on June 09, 2006, 09:05:15 pm
I download C::B that includes mingw (codeblocks-1.0rc2_mingw.exe)  and MSW setup (wxMSW-2.6.3-Setup-1.exe). After installing that I followed instructions in wiki to build MSW, I added  <MINGW>\bin; and <MINGW>\mingw32\bin; to path (where <MINGW> for me points to C:\CodeBlocks as I understand) and constantly had 'cannot exec cc1' error when trying to execute "mingw32-make -f makefile.gcc  MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release". But when I downloaded bat file posted by MortenMacFly above and corrected paths there for my case it worked!

But actually I cannot tell what was wrong :), perhaps <MINGW> must be in the PATH too (C:\CodeBlocks for me) and <MINGW>\mingw32\bin is not needed.
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: oz on June 10, 2006, 07:09:19 am
I am using the wxWidgets2.6.3 patch 1. This morning, I unziped the patch 2 files to the root directory of wxWidgets, and make clean then make it again, is that the correct way to apply the patch or not :shock:?
Title: Re: wxWidgets 2.6 (MSW, GCC) installation instructions
Post by: Defender on June 10, 2006, 07:58:26 am
I am using the wxWidgets2.6.3 patch 1. This morning, I unziped the patch 2 files to the root directory of wxWidgets, and make clean then make it again, is that the correct way to apply the patch or not :shock:?
This is correct  :)