Author Topic: New to Code Blocks  (Read 17308 times)

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: New to Code Blocks
« Reply #15 on: July 22, 2006, 07:29:54 am »
Are you using the RC2 build or a nightly build or SVN ?   You get the most stable response if you are using something that has been released SINCE RC2.

Offline DaveK

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: New to Code Blocks
« Reply #16 on: July 22, 2006, 12:41:07 pm »
version 1.0rc2 is the version I have.

Offline DaveK

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: New to Code Blocks
« Reply #17 on: July 22, 2006, 04:05:22 pm »
this gets worse. I can't even compile the sample programs found in the wx/samples directory. For example I try to compile Calendar and I get wxStatusBarBeneric has not been declared. I try to compile access and it gets to linking but it gives me a few (well a lot) of undefined references. Here is the first undefined line

vc_mswunivudll\base\src\common\filename.o:filename.cpp:(.text+0x180e): undefined reference to 'CoCreateInstance@20'
vc_mswunivudll\base\src\common\filename.o:filename.cpp:(.text+0x1830): undefined reference to 'IID_IPersistFile'
vc_mswunivudll\base\src\common\regex.o:regex.cpp:(.text+0x84): undefined reference to 'wx_regfree'

I apologize if the solution for this is extremely simple or I forgot to perform some task, however I believe I followed the instructions to installing mingw32 and for compiling wxWidgets. That is I followed that tutorial linked above. Do these error mean I haven't fully compiled wxWidgets or forgot a step? Should I perhaps recompile? The version of wxWidgets I downloaded was a stable version so I'm a bit skeptical that wxWidgets is faulty.

Thanks for any help!  :o

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: New to Code Blocks
« Reply #18 on: July 22, 2006, 08:33:17 pm »
Please remove RC2 and install a nightly build first :)

BTW, are you trying to link a version of wxWidgets compiled with MSVC using MinGW?

vc_mswunivudll <-- look suspicious.... VC and Univ...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2150
Re: New to Code Blocks
« Reply #19 on: July 22, 2006, 08:34:54 pm »
this gets worse. I can't even compile the sample programs found in the wx/samples directory. For example I try to compile Calendar and I get wxStatusBarBeneric has not been declared. I try to compile access and it gets to linking but it gives me a few (well a lot) of undefined references. Here is the first undefined line

vc_mswunivudll\base\src\common\filename.o:filename.cpp:(.text+0x180e): undefined reference to 'CoCreateInstance@20'
vc_mswunivudll\base\src\common\filename.o:filename.cpp:(.text+0x1830): undefined reference to 'IID_IPersistFile'
vc_mswunivudll\base\src\common\regex.o:regex.cpp:(.text+0x84): undefined reference to 'wx_regfree'

I apologize if the solution for this is extremely simple or I forgot to perform some task, however I believe I followed the instructions to installing mingw32 and for compiling wxWidgets. That is I followed that tutorial linked above. Do these error mean I haven't fully compiled wxWidgets or forgot a step? Should I perhaps recompile? The version of wxWidgets I downloaded was a stable version so I'm a bit skeptical that wxWidgets is faulty.

Thanks for any help!  :o
CoCreateInstance is in a minGW libole32.a, so include ole32 in build options; linker; link libraries.

IPersistFile is in libuuid in minGW, so include uuid in build options; linker; link libraries.

wx_regfree in is the widgets /lib either in the libwxmsw26u (if you use unicode monolithic) or libwxregexu for (unicode non-monolithic) Its' name will be without  the 'u' if you made an ansi widgets.



EDIT: Ceniza posted before me. You guys need to give me a turn  :D
  Oh well.. guess I shouldn't leave that slug trail...
« Last Edit: July 22, 2006, 08:38:38 pm by Pecan »

Offline DaveK

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: New to Code Blocks
« Reply #20 on: July 23, 2006, 12:33:20 am »
Please remove RC2 and install a nightly build first :)

BTW, are you trying to link a version of wxWidgets compiled with MSVC using MinGW?

vc_mswunivudll <-- look suspicious.... VC and Univ...

Actually, I recompiled wxWidgets using mingw32-make. I ran a clean first then I recompiled. Was this a bad move? Should I remove wxWidgets complete. Redownload and then recompile?

I will try removing rc2 installing the night build then installing the stable build if that is what you mean to do.

Thanks!  :)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: New to Code Blocks
« Reply #21 on: July 23, 2006, 12:57:58 am »
Just be sure to follow the steps to compile it just like the wiki suggests. A clean followed by a recompile should be OK.

Quote from: DaveK
I will try removing rc2 installing the night build then installing the stable build if that is what you mean to do.

Stable build? Just remove RC2 and install a nightly build :)

Offline DaveK

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: New to Code Blocks
« Reply #22 on: July 23, 2006, 02:05:27 pm »
Well I did read the nightly build page on how to install this thing but perhaps I had a few expectations that I didn't see right off. One of them was since I was asked to remove RC2 I was looking for an install program. Can't find it. All I see is an image, lexers, plugins, scripts directory, which only was contained in a share/CodeBlocks directory that matches the share directory in my old install. Thinking all I do is replace the old share directory with this one, that is exactly what I did. The nightly build how to page was very cryptic for me. It kept referring to an install file and codeblocks.exe, but none of that came with the nightly build so I just used my old build. However something tells me this isn't what you had in mind. I start up Codeblocks and immediately get error message after error message and now I don't have a toolbar and most of the menu options will not work. I can't even get import to work to import a sample wxWidget program.

I apologize for being slow on this. Look at it from my point of view. I've been trying to get CodeBlocks working now for almost a week and I am probably just as frustrated as those here who are wondering what is taking me so long. ;)

sethjackson

  • Guest
Re: New to Code Blocks
« Reply #23 on: July 23, 2006, 02:28:24 pm »
Well I did read the nightly build page on how to install this thing but perhaps I had a few expectations that I didn't see right off. One of them was since I was asked to remove RC2 I was looking for an install program. Can't find it. All I see is an image, lexers, plugins, scripts directory, which only was contained in a share/CodeBlocks directory that matches the share directory in my old install. Thinking all I do is replace the old share directory with this one, that is exactly what I did. The nightly build how to page was very cryptic for me. It kept referring to an install file and codeblocks.exe, but none of that came with the nightly build so I just used my old build. However something tells me this isn't what you had in mind. I start up Codeblocks and immediately get error message after error message and now I don't have a toolbar and most of the menu options will not work. I can't even get import to work to import a sample wxWidget program.

I apologize for being slow on this. Look at it from my point of view. I've been trying to get CodeBlocks working now for almost a week and I am probably just as frustrated as those here who are wondering what is taking me so long. ;)

You can't replace the old share directory with the new one that will never work.

Just uninstall RC2, download 7-zip, get the dlls, and the Code::Blocks build from the nightly build posts. Then extract everything, and place the dlls inside wherever you extracted the Code::Blocks build.

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: New to Code Blocks
« Reply #24 on: July 23, 2006, 03:34:30 pm »
Download latest nightly build from here:
http://forums.codeblocks.org/index.php?board=20.0

e.g. (for Windows with MinGW installed):
23 July build message
http://forums.codeblocks.org/index.php?topic=3639.0
Code::Blocks (extract in a dir and it is ready, no installer)
http://prdownload.berlios.de/codeblocks/CB_20060723_rev2778_win32.7z
Required DLL (extract this in the same dir as Code::Blocks)
http://prdownload.berlios.de/codeblocks/wxmsw26u_gcc_cb_wx2.6.3p2.7z

Remember to install a newer version of GDB.
MinGW comes with gdb 5.2.1 which does not work with C::B, please dowload 6.3-2 version here (or anywhere else):
http://sourceforge.net/project/showfiles.php?group_id=2435

Offline DaveK

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: New to Code Blocks
« Reply #25 on: July 23, 2006, 05:36:50 pm »
I think we are close. Here is what I have done for a summary

installed nightly build July 23rd.
Installed wxmsw26u_gcc_cb.dll. This is located in the CodeBlocks directory.
installed 6.3-2 version of GDB. which was zipped with specific path information. I simply unzipped the 7z file into the CodeBlocks directory maintaining the path information found in the zip file.
reinstalled wxWidgets 2.6.3
Recompiled wxWidgets using the mingw32 version I already had. Compile ran through fine
Opened codeBlocks. Works wonderfully now and looks better!
Open a wxWidgets sample called access. Said yes to all questions as it opened.
Compiled access and was able to make it past the wx/msw/wx.rc not found by setting up the right directory structure under the project options->directory tab. Got past a wx/setup.h not found error by just copying setup.h from wx/msw into wx/
It compiles but will not link
link errors:
undefined reference to 'wxAppConsole::CheckBuildOptions(char...)
undefined reference to 'wxApp::wxApp()
and so on to 50. Says there is more.

Obviously my linking information in not correct? Can anyone provide me with help in what I need to fix so this can link?

Thanks for the help thus far! :)

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: New to Code Blocks
« Reply #26 on: July 23, 2006, 05:53:32 pm »
installed 6.3-2 version of GDB. which was zipped with specific path information. I simply unzipped the 7z file into the CodeBlocks directory maintaining the path information found in the zip file.
GDB had to be put in the MinGW dir, not the C::B one!

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2150
Re: New to Code Blocks
« Reply #27 on: July 23, 2006, 06:03:47 pm »
I think we are close. Here is what I have done for a summary

installed nightly build July 23rd.
Installed wxmsw26u_gcc_cb.dll. This is located in the CodeBlocks directory.
installed 6.3-2 version of GDB. which was zipped with specific path information. I simply unzipped the 7z file into the CodeBlocks directory maintaining the path information found in the zip file.
reinstalled wxWidgets 2.6.3
Recompiled wxWidgets using the mingw32 version I already had. Compile ran through fine
Opened codeBlocks. Works wonderfully now and looks better!
Open a wxWidgets sample called access. Said yes to all questions as it opened.
Compiled access and was able to make it past the wx/msw/wx.rc not found by setting up the right directory structure under the project options->directory tab. Got past a wx/setup.h not found error by just copying setup.h from wx/msw into wx/
It compiles but will not link
link errors:
undefined reference to 'wxAppConsole::CheckBuildOptions(char...)
undefined reference to 'wxApp::wxApp()
and so on to 50. Says there is more.

Obviously my linking information in not correct? Can anyone provide me with help in what I need to fix so this can link?

Thanks for the help thus far! :)
You're mixing up a ansi setup.h with a unicode widgets dll.

If you're going to copy setup.dll there is one for .../mswu (unicode) and one for .../msw (ansi). But I wouldnt copy them at all. I'd just add a reference to the correct one into the build options/directories/compiler section.

Offline DaveK

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: New to Code Blocks
« Reply #28 on: July 23, 2006, 09:10:41 pm »
I am literally at my wits end. I have spent hours on this and I can't seem to get further even if I remove and reinstall everything according to the links you provide me. I either get a "wx/setup.h directory not found (even after adding the directory to the project build options, or I get linking errors like _imp__wxframeNameStr. I really don't understand why this is so hard for me to figure out or even setup, but after spending 3 hours today, 2 hours yesterday and 1 hour the day before and haven't still be able to compile a single wxWidgets file in codeblocks I'm getting to the point where i'm about to throw my hands up in the air and say this is worth my time. But I really would love to see wxWidgets work for here. I have no clue what I am doing wrong. I believe I have followed the instructions. They seem like a no-brainer. Why would Codeblocks be giving me this much grief.

I'm taking a nap.  :(

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2150
Re: New to Code Blocks
« Reply #29 on: July 24, 2006, 01:17:53 am »
Turn on Menu/Settings/compiler and debugger/other/compiler logging/Full command line.

Run your compile and copy/paste the compiler command line from Build Log message window to the forum here.

Lets see what cflags and libs are specified.