Author Topic: Problems with wxWidgets Applications  (Read 19250 times)

RKCole

  • Guest
Problems with wxWidgets Applications
« on: January 25, 2006, 05:26:37 am »
I apologize if this has been placed before...

I have never used command-line compilers in the past, and I am not sure how to go about this...
My uncle and I are both having problems successfully compiling the wxWidgets template provided by Code::Blocks.  I have wxWidgets installed to the C:\wxWidgets-2.6.2 directory, but it seems to no avail.

I am not sure what I need to do to get the wxWidgets libraries to work with Code::Blocks.  I've read all I could find, including the Wiki on how to install it via the command-line tin Windows...unless I read the wrong one, my command prompt in windows states that "make" is an invalid command.

What do I need to do to get this to work?  I'm quite confused...just wish I knew more on this.

Thanks for any help provided.

Take care.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Problems with wxWidgets Applications
« Reply #1 on: January 25, 2006, 05:30:10 am »
Try mingw32-make instead of make.

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #2 on: January 25, 2006, 05:54:55 am »
Thanks for the response, Ceniza.  I'm not sure what I am doing wrong.  Here is what I get from the command:
Code
C:\wxWidgets-2.6.2\build\msw>mingw32-make -f makefile.gcc clean
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Problems with wxWidgets Applications
« Reply #3 on: January 25, 2006, 06:01:23 am »
OK try this. Search for the file mingw32-make.exe. It should be under the codeblocks dir somewhere.  If you find it, add the respective folder to "My Computer" environment variable "path".

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #4 on: January 25, 2006, 06:17:30 am »
Thanks, rickg22.

The command iswroking now, and once I get to try the instructions on the Wiki, I will post back.

Thanks again.

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #5 on: January 25, 2006, 07:41:34 am »
I followed the instructions on the Wiki to the letter, but I think I still did something wrong.  After the compilation was complete, I tried to create and compile/run a wxWidgets application (the one from the template), and I received an error that stated that the program was terminated because wxmsw26_gcc_cb.dll was not found, but the dll file was in the Code::Blocks default directory.  Now when I try to open the project (the default template project) I created, I receive an error stating that "codeblocks.exe has encountered an error and needs to close"...I'm not sure what happened...

Sorry for all of the inconvenience here.  I'm going to try a fresh install tomorrow, and just go through the process again.

Thanks for the help and responses.  Hopefully I just did something minor, and hopefully I can get this fixed.

Take care and thanks for the help so far.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Problems with wxWidgets Applications
« Reply #6 on: January 25, 2006, 10:52:11 am »
After building wxWidgets you have to put the include/lib directory(ies) in C::B. Concerning the dll(s) you can put their path in the system environmental variable PATH (do not put them in windows\sytem32 directory).

You may also want to give a try to Therion's wxWidgets 2.6.2 build.

Michael

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #7 on: January 26, 2006, 01:22:54 am »
Hello again.

I uninstalled/reinstalled both Code::Blocks and wxWidgets 2.6.2.  I also went through and re-built wxWidgets.  I also registered the DLLs and I believe I set the include/lib up correctly. (The include goes into the compiler (in Settings->Compiler) and the lib folder location is placed in the Linker directories, correct?)

Now when I compile the basic wxWidge5ts template, I just receive an error that states "The program failed to start because wxmsw26_gcc_cb.dll" was not found..."

I noticed there were two DLLs (one in the CodeBlocks directory and one in the wxWidgets-2.6.2\lib\gcc_dll\ directory).  Should I register one or both of these in the Path variable under the Environment Variables settings?

I'm sorry for all of this frustration...

Thanks for the help.

Take care.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Problems with wxWidgets Applications
« Reply #8 on: January 26, 2006, 01:27:02 am »
A DLL is a dynamically link library. It contains a bunch of code a program uses when it runs.  When a program starts up the OS tries its best to find the DLL the program needs.  The first place it look sis in the directory of the executable.  So if you just copy the dll to the programs directory it will run just fine.

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #9 on: January 26, 2006, 01:51:52 am »
Thanks, Game_Ender.

That solved the problem.

so, whenever I create a wxWidgets app, I just need to make sure that DLL si copied into the same directory as each created application, correct?

Thanks very much for the responses, everyone.  Everythign seems to be working smoothly now.

Take care.

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #10 on: January 27, 2006, 05:03:12 pm »
Well, I thought I had it working but apparently I was wrong.  It was working perfectly fine, but now I am not sure what is going on.  I only receive this message during the compilatin process:
Code
lb.exe     cannot find -lwxmsw26

Not exactly sure what is going on because it was working just fine earlier.

Thankss for all of the help; I'm definitely doing a lot better with this than I was earlier.

Take care.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Problems with wxWidgets Applications
« Reply #11 on: January 27, 2006, 07:32:39 pm »
Well, I thought I had it working but apparently I was wrong.  It was working perfectly fine, but now I am not sure what is going on.  I only receive this message during the compilatin process:
Code
lb.exe     cannot find -lwxmsw26

It is more the linking process rather than the compiling process. The problem is that it cannot find the mentioned library. Why? It is not so easy to find out. Check if all your pathes are set correctly. You can also try with a clean and then re-build.

Michael

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #12 on: January 27, 2006, 09:56:52 pm »
Thanks for the response, Michael.

I checked my directories in Code::Blocks Settings->Compiler->Directories.  I made sure that C:\wxWidgets-2.6.2\include\ was set as a directory.  In the Linker directory I set a path for C:\wxWidgets-2.6.2\lib\.  I am not sure if there is anything else I need to do pertaining to that.

I also went even farther and (I am sure this probably did not have to be done...) I uninstalled C::B and wxWidgets, deleted all registry keys, then reinstalled both and rebuilt wxWidgets using the Wiki Guide.  Unfortunately I am still receiving the same message.

Is there anything else I should do or look for?

Thanks for the help; it is much appreciated.

Take care.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Problems with wxWidgets Applications
« Reply #13 on: January 27, 2006, 10:03:30 pm »
...
Is there anything else I should do or look for?

Thanks for the help; it is much appreciated.
please post your project as attachement here, i'll look at it and if i find something, i'll correct it.

RKCole

  • Guest
Re: Problems with wxWidgets Applications
« Reply #14 on: January 27, 2006, 10:33:16 pm »
tiwag,

While looking through the project folder I created (the project is just the wxWidgets template from Code::Blocks) I noticed there was a file named wx_pch.h.gch which is about 38.1MB in size.  Would this have something to do with the situation at all?

I will still post the project if you would like.  It is just the wxWidgets template with no changes.  I was going to try to compile the template to see if it would work; I was just planning on manipulating it if it compiled/linked correctly so that I could begin teaching myself wxWidgets.

Thanks for the help.