[sample] not able to compile the "widgets" sample Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
MoonKid
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 543
Joined: Wed Apr 05, 2006 9:39 am
Contact:

[sample] not able to compile the "widgets" sample

Post by MoonKid » Mon Feb 26, 2007 7:33 pm

I am using wxWidgets 2.9.0 from CVS. I build it without any problems with MSVC6-IDE.
I am able to build and rund some samples, too.

But I am not able to compile the "widgets" sample.

It is just the error-log

Code: Select all

--------------------Konfiguration: widgets - Win32 Unicode Debug--------------------
Kompilierung l

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Mon Feb 26, 2007 11:46 pm

This is an english forum, i doubt that many people will understand the german errors :lol: at least i don't

Trikko
Experienced Solver
Experienced Solver
Posts: 94
Joined: Tue Oct 18, 2005 8:28 pm
Location: Venice, IT
Contact:

Post by Trikko » Tue Feb 27, 2007 12:59 am

Auria wrote:This is an english forum, i doubt that many people will understand the german errors :lol: at least i don't
Me neither, but we can try. Take a look:
C:\wxWindowsMSVC\samples\widgets\bmpcombobox.cpp(402) : fatal error C1001: INTERNER COMPILER- FEHLER
1 Fehler
It seems to be an internal compiler error. My question is: why do you still use visual c++ 6? It's an old compiler, there are many new free compilers from Microsoft too. You can download Microsoft Visual C++ express 2005 (with ide!), that's free and works better than vc6!

MoonKid
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 543
Joined: Wed Apr 05, 2006 9:39 am
Contact:

Post by MoonKid » Tue Feb 27, 2007 6:14 am

Trikko wrote:It seems to be an internal compiler error. My question is: why do you still use visual c++ 6?
I use MSVC6 just for the samples because they are as MSVC projects available. I am quite sorry for that!
Visual c++ Express tries to install some other non-visual-specific components like each other MS software does. It is a virus! ;)
I do not like to infect my system with things like that.

In production I use mingw to compile wxWidgets and use Code::Blocks (nightlys) as IDE.

Is there a other way to compile the samples?

JSThePatriot
Earned some good credits
Earned some good credits
Posts: 146
Joined: Sun Nov 26, 2006 7:37 am
Location: Tennessee, USA
Contact:

Post by JSThePatriot » Tue Feb 27, 2007 6:58 am

MoonKid wrote:
Trikko wrote:It seems to be an internal compiler error. My question is: why do you still use visual c++ 6?
I use MSVC6 just for the samples because they are as MSVC projects available. I am quite sorry for that!
Visual c++ Express tries to install some other non-visual-specific components like each other MS software does. It is a virus! ;)
I do not like to infect my system with things like that.

In production I use mingw to compile wxWidgets and use Code::Blocks (nightlys) as IDE.

Is there a other way to compile the samples?
I use Code::Blocks Nightly's as my IDE with MinGW. I have compiled all of the 2.8.0 samples.

I imported the main project in the samples folder. Then to compile any or all of them I would have to add the following to the project.
Linker
libwxmsw28u.a
comctl32
gdi32
ole32
oleaut32
uuid

Directories
Compiler
$(#wx)\include
$(#wx)\lib\gcc_dll\mswu
$(#wx)\contrib\include

Linker
$(#wx)\lib\gcc_dll

Resources
$(#wx)\include
Add those, and be sure that wx is the name of your global variable pointing to your wxWidgets directory. Also that is for the MONOLITHIC, UNICODE, SHARED setup of wxWidgets. (You should notice that by the libwxmsw28u.a).

I hope this helps some.
JS

MoonKid
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 543
Joined: Wed Apr 05, 2006 9:39 am
Contact:

Post by MoonKid » Tue Feb 27, 2007 6:00 pm

JSThePatriot wrote:I use Code::Blocks Nightly's as my IDE with MinGW. I have compiled all of the 2.8.0 samples.
Did you compile wxWidgets itself with C::B, too?

Why there are no C::B project/workspace files in the wxWidgets repository?

If there is in interest for this, I would build some.

Trikko
Experienced Solver
Experienced Solver
Posts: 94
Joined: Tue Oct 18, 2005 8:28 pm
Location: Venice, IT
Contact:

Post by Trikko » Tue Feb 27, 2007 6:20 pm

You can use VC2005 as a command line compiler. I don't use IDE at all, i use makefile to compile wxwidgets and codeblocks as ide. I've got 3 compiler, vc 2005, digital mars 8.49 and mingw. Mingw gives me always worst results on speed and size. And is the only compiler that can't compile a stand-alone app (it always depend on msvcrt.dll).

JSThePatriot
Earned some good credits
Earned some good credits
Posts: 146
Joined: Sun Nov 26, 2006 7:37 am
Location: Tennessee, USA
Contact:

Post by JSThePatriot » Tue Feb 27, 2007 6:41 pm

MoonKid wrote:Did you compile wxWidgets itself with C::B, too?

Why there are no C::B project/workspace files in the wxWidgets repository?

If there is in interest for this, I would build some.
No I didn't compile wxWidgets with C::B. I used the command line of MinGW to do that.

I am suprised since C::B is solely based on wxWidgets that there isn't a closer tie between the communities. I actually looked up wxWidgets again (after years of having heard about it in the past) when I found C::B. So I have them to thank for getting me here in the first place.

I have all of the compilers that C::B can use installed. I have however been unable to get most of them to work =P.
Trikko wrote:You can use VC2005 as a command line compiler. I don't use IDE at all, i use makefile to compile wxwidgets and codeblocks as ide. I've got 3 compiler, vc 2005, digital mars 8.49 and mingw. Mingw gives me always worst results on speed and size. And is the only compiler that can't compile a stand-alone app (it always depend on msvcrt.dll).
I didn't realize MinGW relied upon MSVCRT.dll. I thought I had read some where that it no longer relies upon that. I dont remember where it was that I could have possibly read that. I have read many places that VC 2k5 is a much better compiler for speed and size. I have just ran into errors when playing with other compilers outside of MinGW, not to mention I plan on cross-compiling my programs so I assumed that MinGW would be the best option for that.

Thanks,
JS

biplab
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Fri Feb 17, 2006 4:16 am
Location: Singapore
Contact:

Post by biplab » Wed Feb 28, 2007 2:29 am

JSThePatriot wrote: I have all of the compilers that C::B can use installed. I have however been unable to get most of them to work =P.
May I know which compiler is not working? I can add that in my to-do list. :)

C::B presently has problem with OpenWatcom in the linking as it was not updated for the latest release of OpenWatcom. You'll be glad to know that work is in progresss. You may monitor the following thread for more details.

http://forums.codeblocks.org/index.php/ ... 286.0.html

Apart from that I use it regularly with MinGW, MSVC 7.1, MSVC 8, BCC 5.5.1, BCC 5.82, Digital Mars in Windows and GCC 4.1.2 and Intel C++ Personal Edition in Linux. I don't face much problem.
MoonKid wrote:Did you compile wxWidgets itself with C::B, too?

Why there are no C::B project/workspace files in the wxWidgets repository?
I can't answer your question directly. But if you face any difficulty in compiling, you can download wxPack (http://wxpack.sourceforge.net). It comes with wx lib compiled with MinGW and MSVC 7.1. You can try that. :)

Otherwise you can try it once to compile on your own. It's not that difficult. :)

C::B presently has excellent support for creating wxWidgets based app (GCC, MSVC 7.1 & 8, BCC 5.5.1 & 5.82). Download a latest nightly and you won't event have to set any settings manually. :) Check the following nightly which has integrated support for wxFormBuilder, too. :)

http://forums.codeblocks.org/index.php/ ... 289.0.html

Regards,

Biplab
Blog: http://biplab.in

IDE: Code::Blocks
Compilers: GCC, MSVC, etc. ;)
OS: WinXP-SP2 & Linux.

MoonKid
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 543
Joined: Wed Apr 05, 2006 9:39 am
Contact:

Post by MoonKid » Thu Mar 01, 2007 7:42 am

JSThePatriot wrote:I use Code::Blocks Nightly's as my IDE with MinGW. I have compiled all of the 2.8.0 samples.

I imported the main project in the samples folder. Then to compile any or all of them I would have to add the following to the project.
Ok, I am trying this know. I imported the complet sample workspace and set up the build options and try to compile the "widgets" sample.

The compiler says
[err]
:: can't open icon file `sample.ico': No such file or directory
[/err]

It is defined in sample.rc of course. I do not know why it did not find it, because sample.rc and sample.ico are in the same directories!

My build settings (for debug unicode)

Search directories - Compiler
$(#wx)\include
$(#wx)\contrib\include
$(#wx)\lib\gcc_dll\mswud

Search directories - Linker
$(#wx)\lib\gcc_dll

Search directories - Resource Compiler
.
$(#wx)\include

And all the libs you described.

As I see it should find the sample.ico.

How does this sample compile on your machine?

JSThePatriot
Earned some good credits
Earned some good credits
Posts: 146
Joined: Sun Nov 26, 2006 7:37 am
Location: Tennessee, USA
Contact:

Post by JSThePatriot » Fri Mar 02, 2007 1:44 pm

biplab wrote:
JSThePatriot wrote: I have all of the compilers that C::B can use installed. I have however been unable to get most of them to work =P.
May I know which compiler is not working? I can add that in my to-do list. :)

C::B presently has problem with OpenWatcom in the linking as it was not updated for the latest release of OpenWatcom. You'll be glad to know that work is in progresss. You may monitor the following thread for more details.

http://forums.codeblocks.org/index.php/ ... 286.0.html

Apart from that I use it regularly with MinGW, MSVC 7.1, MSVC 8, BCC 5.5.1, BCC 5.82, Digital Mars in Windows and GCC 4.1.2 and Intel C++ Personal Edition in Linux. I don't face much problem.
MoonKid wrote:Did you compile wxWidgets itself with C::B, too?

Why there are no C::B project/workspace files in the wxWidgets repository?
I can't answer your question directly. But if you face any difficulty in compiling, you can download wxPack (http://wxpack.sourceforge.net). It comes with wx lib compiled with MinGW and MSVC 7.1. You can try that. :)

Otherwise you can try it once to compile on your own. It's not that difficult. :)

C::B presently has excellent support for creating wxWidgets based app (GCC, MSVC 7.1 & 8, BCC 5.5.1 & 5.82). Download a latest nightly and you won't event have to set any settings manually. :) Check the following nightly which has integrated support for wxFormBuilder, too. :)

http://forums.codeblocks.org/index.php/ ... 289.0.html

Regards,

Biplab
I have never had a problem with the compilers working with C::B. I have just had a problem with code working between them.

I love using wxFormBuilder. Supposedly wxSmith is really great, but I have been unable to get it to work properly.

@MoonKid
Compile the samples individually. That sample.ico needs to be in some of the other directories. I had that same problem before.

I hope this helps further!
JS

Post Reply