Author Topic: New CB/wxWidgets User having initial setup issues  (Read 6287 times)

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
New CB/wxWidgets User having initial setup issues
« on: July 13, 2006, 12:02:40 am »
I've recently had CB suggested to me from a friend who found CodeBlocks via www.opensourcewindows.org.  It seems really appealing and having friends who use Linux (i used WinXP/sp2) I would like us to be able to work on minor projects and be able to share src code with as few changes as possible and with everyone using the same IDE.  CodeBlocks + wxWidgets + Boost seems like it would be a great way to accomplish this.

Now in order to get a clean impression i completely uninstalled my VS.Net, MSDN and all other dev programs.  I want to see how easy it is to get CB working from a clean environment.  As per the directions at:

http://forums.codeblocks.org/index.php?topic=1701.0

I started off installing MinGW.  I choose the packages listed at:

http://wiki.codeblocks.org/index.php?title=MinGW_installation

that was referenced from the forum topic already listed.  Just for reference this means i installed:

    * http://prdownloads.sourceforge.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download
    * http://prdownloads.sourceforge.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download
    * http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download
    * http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz?download
    * http://prdownloads.sf.net/mingw/w32api-3.5.tar.gz?download
    * http://prdownloads.sf.net/mingw/binutils-2.16.91-20050827-1.tar.gz?download
    * http://prdownloads.sourceforge.net/mingw/mingw32-make-3.80.0-3.tar.gz?download
+ GDB:
    * http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download

Location for installation was  C:/Dev/MinGW.  I updated my path environment variable (right click My COmputer,preferences,advanced,envvars) so that at the very _beginning_ of the path i added

C:/Dev/MinGW/bin;C:/Dev/MinGW/mingw32/bin;

as required in the instructions.  Next i downloaded wxWidgets 2.6.3 to  C:\Dev\wxWidgets-2.6.3, opened a dos window and navigated to build/msw and cleaned/compiled via:

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

I got the normal warnings and successful compilation.  After installing TortoiseSVN i downloaded the SVN src to C:/Dev/CodeBlocksSVN.  As per instructions i downloaded a nightly build (date 11 July 2006) via:

http://prdownload.berlios.de/codeblocks/CB_20060711_rev2733_win32.7z

So at this point I used the nightly build and updated the wx global variable to the proper path.  Compiling the SVN project took a few minutes but had no warnings/errors.  At this point the instructions in the original url i listed above told me i needed to:

"copy wxmsw26u_gcc_cb.dll from lib\gcc_dll\mswu inside the wxWidgets directory to the devel directory inside the Code::Blocks source folder"

no such file exists from compiling wxWidgets by the method above.  Instead in lib/gcc_dll  (parent of the suggested mswu) i found wxmsw26u_gcc_custom.dll and assumed it was the proper dll to use.  I placed it inside the devel directory instead.  As a side note if you rename the dll to the filename suggested 'wxmsw26u_gcc_cb.dll' you'll get a missing dll message if you attempt to run CB.  The instructions should be updated to reflect the proper location / name if possible.

Next step is to execute update.bat.  Upon doing this action I am given a dozen or more errors stating:

'zip' is not recognized as an internal or external command, operable command or batch file

I personally use winrar for all my zip needs.  It does not provide a path accessible 'zip' command.  I went ahead and installed www.7-zip.com's zip program and it does not provide that by default either.  I at this point double checked all of the MinGW bin directories and triple checked the downloaded files and found no zip utility there either.

Could you please provide a link to the specific zip program that the update.bat batch file is assuming to exist?  As a test i copied the
C:\Program Files\7-Zip\7z.exe into the path, renamed as zip.exe.  7zip does not handle the -j9 argument used in update.bat.  Regardless after copying it into the path under that name the error messages changed to:

"The system cannot find the file specified"

This occurs at some point after 'Copying files' is echoed and prior to 'echo Makefile.am > excludes.txt' being performed.  As a note this error also appeared even before I renamed 7zip.

The reason i think this missing zip utility is important is that if I run CB from the 'output' directory i get an odd error:

Cannot find resources...
Code::Blocks was configured to be installed in 'C:\Dev\CodeBlocks SVN Head\src\output\share\CodeBlocks'.
Please use the command-line switch '--prefix' or set the CODEBLOCKS_DATA_DIR environment variable to point where Code::Blocks is installed, or try reinstalling the application.

I tried using the forum search for "  'zip' is not recognized"   wtih no results.  Also tried 'cannot find the file' with equally no results.  The SVN version i downloaded was 2740 and the issue was not resolved when i upgraded to 2741 a few minutes ago.  If i've forgotten any information (i try to be nearly idiotically thorough in details) just ask.   All help appreciated.

The nightly build works great btw.  If I cant get SVN working I'll still be able to use the nightly.  As a minor additional question (since i've never used wxWidgets before) should I compile wxWidgets again with MONOLITHIC=0 or is the mono.dll the best choice for personal projects ?

mdelfede

  • Guest
Re: New CB/wxWidgets User having initial setup issues
« Reply #1 on: July 13, 2006, 12:26:39 am »
Yes, I found the same problems first time I compiled C::B.
The DLL il misnamed (and misplaced) and the zip.exe prog is needed.
I did download it from http://www.info-zip.org/ .
After you install the zip.exe prog (and place the dll), working with svn version goes as a charm.

mdelfede

  • Guest
Re: New CB/wxWidgets User having initial setup issues
« Reply #2 on: July 13, 2006, 12:41:11 am »
I just did some small updates to the wiki.
Now the dll is correctly named and there's also a note to zip.exe prog and where to find it.

Ciao

Max

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: New CB/wxWidgets User having initial setup issues
« Reply #3 on: July 13, 2006, 12:51:24 am »
Thank  You !!!

That zip file got rid of both issues and the output directory works like a charm now.  Problem solved.  Also ty for updating the wiki.  I have 2 friends waiting for me to do some testing with the Boost libraries who are potentially gonna be C::B users if all goes well with me.  Love the work.

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: New CB/wxWidgets User having initial setup issues
« Reply #4 on: July 13, 2006, 12:59:33 am »
Hi,
I'm interested in the same problems!
I've seen your updates in the wiki, but I have some notes:
1) the DLL name and directory should be updated for the ANSI version too?
2) the wxWidgets version indicated is 2.6.2, but now there is the 2.6.3 (and it seems everybody is using this, now), can you update the name and the link (http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.6.3-1.zip)?
3) there is a forum topic with exactly the same informations of the wiki, that should be update too or removed at all, adding a link to the wiki (so there is only one version to mantain)
Wiki link:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows
Forum link:
http://forums.codeblocks.org/index.php?topic=1701.0

Thank you very much!

mdelfede

  • Guest
Re: New CB/wxWidgets User having initial setup issues
« Reply #5 on: July 13, 2006, 01:37:16 am »
Hi,
I'm interested in the same problems!
I've seen your updates in the wiki, but I have some notes:
1) the DLL name and directory should be updated for the ANSI version too?
2) the wxWidgets version indicated is 2.6.2, but now there is the 2.6.3 (and it seems everybody is using this, now), can you update the name and the link (http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.6.3-1.zip)?
3) there is a forum topic with exactly the same informations of the wiki, that should be update too or removed at all, adding a link to the wiki (so there is only one version to mantain)
Wiki link:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows
Forum link:
http://forums.codeblocks.org/index.php?topic=1701.0

Thank you very much!

The dll is now updated for ansi too.
For the wxWidgets version I've added a note with a link to wxWidgets web page.

Ciao

Max