News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

try to compile wxWidgets samples

Started by MoonKid, March 01, 2007, 08:01:51 PM

Previous topic - Next topic

MoonKid

I work with wxWidgets CVS and Code::Blocks nightly on WinXP with MinGW.

I am trying to build the wxWidgets samples with C::B. I imported the samples.dsw and made some settings in the "build options". Now I tried to build the "widgets" sample.

There is this error, at the beginning of compiling.
[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

Libs
libwxmsw29ud.a
comctl32
gdi32
ole32
oleaut32
uuid

I do not see, why the resource compiler did not found the ico-file in the directory. Of course it is there, because I checked it. :)

stahta01

Is your workspace file in the same directory as samples.dsw?
Where is your project cbp file in relation to sample.ico?
I think you need to have add the parent directory.

Search directories - Resource Compiler
..
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MoonKid

Quote from: stahta01 on March 01, 2007, 08:28:27 PM
Where is your project cbp file in relation to sample.ico?
I think you need to have add the parent directory.

Of course you are right! ;)

The ico- and the rc-file are in the parent directory. And I thougt that the search-dirs are relativ to the current compiling file (the rc-file).
But the rc- and the ico-file is relative to the project file in the parent dir. I added the parent dir to the search-dirs and it compile fine.

Now the linker make problems. It says
[linker]
C:\wxWindows\samples\widgets\bmpcombobox.cpp:229: variable 'vtable for wxTextCtrl' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
[/linker]

I know this option, but do not know where I can switch it off.
I searched in the advanced options, too.

stahta01

I have no idea for that message from the linker.
If you want, I can try to compile the project myself when I get time?

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Biplab

MoonKid,

The VC import seems to be broken. It fails to import Linker Include Dir and Resource Include Dir.

We'll look into it. Thanks for reporting this bug. :)

For the time being I would give you following suggestion to compile the samples.

  • Download a latest nightly.
  • Create a New Empty wxWidgets project with C::B.
  • Now add the sample source file(s). It should compile properly provided you choose appropriate wxWidgets configuration settings in the wizard.

Regards,

Biplab
Be a part of the solution, not a part of the problem.

MoonKid

Quote from: Biplab on March 02, 2007, 07:42:02 AM
The VC import seems to be broken. It fails to import Linker Include Dir and Resource Include Dir.
We'll look into it. Thanks for reporting this bug. :)

There is nothing about VC. C::B compile the samples with the default (GCC) compiler.

I do not understand the problem right!?

Auria

Quote from: MoonKid on March 04, 2007, 08:38:01 PM
Quote from: Biplab on March 02, 2007, 07:42:02 AM
The VC import seems to be broken. It fails to import Linker Include Dir and Resource Include Dir.
We'll look into it. Thanks for reporting this bug. :)

There is nothing about VC. C::B compile the samples with the default (GCC) compiler.

I do not understand the problem right!?

I'm not sure, but most likely the wxWidgets samples provide VC projects, and Code::Blocks cannot read them properly.

Biplab

Quote from: MoonKid on March 04, 2007, 08:38:01 PM
There is nothing about VC.

No there is nothing about VC compiler support. But there is problem related to importing VC projects. I found that it's not reading the search directories properly.

Quote from: MoonKid on March 04, 2007, 08:38:01 PM
C::B compile the samples with the default (GCC) compiler.

Are you talking about importing the VC project and then compiling it with GCC?
Be a part of the solution, not a part of the problem.

MoonKid

Quote from: Biplab on March 05, 2007, 03:12:37 AM
No there is nothing about VC compiler support. But there is problem related to importing VC projects. I found that it's not reading the search directories properly.

Of course, the import of VC projects does not work. It just imports the name. ;)
I had to do all build settings manualy as I described in the mainpost.

But the import does not matter If I set the build options myself. The linker search dir is set as I described in the mainpost.

Quote from: Biplab on March 05, 2007, 03:12:37 AM
Are you talking about importing the VC project and then compiling it with GCC?

Yes.

Biplab

Quote from: MoonKid on March 04, 2007, 08:38:01 PM
There is nothing about VC. C::B compile the samples with the default (GCC) compiler.
It's very difficult to get some meaning from the statement. It seems that C::B compiles samples with GCC and not with others. Did you try with Other compilers?? I think not.

C::B presently supports GCC, MSVC, BCC, OpenWatcom for wxWidgets based app compilation. So the samples should get compiled by any of these compilers. If you do the manual settings or use C::B's support they should get compiled by all supported compilers.

Quote from: MoonKid on March 05, 2007, 05:37:04 AM
Of course, the import of VC projects does not work. It just imports the name. ;)
No, I can't agree with your statement. What do you mean by "name"?? If it's the project name then you are wrong. It imports a lot more than that.

Quote from: MoonKid on March 05, 2007, 05:37:04 AM
I had to do all build settings manualy as I described in the mainpost.
Quote from: MoonKid on March 05, 2007, 05:37:04 AM
Quote from: Biplab on March 05, 2007, 03:12:37 AM
Are you talking about importing the VC project and then compiling it with GCC?

Yes.
The VC import is meant for importing VC projects. I don't think it'll do the compiler settings mapping. GCC and VC are different compilers and are not compiler options compatible. So if you import a VC project for GCC you have to edit it. This applies to other compilers, too.

The import works well but as I told there are bugs.

I hope you would post clearer messages in future. Some of these statements can confuse users about the ability of C::B.
Be a part of the solution, not a part of the problem.

MoonKid

Quote from: Biplab on March 05, 2007, 06:53:57 AM
The VC import is meant for importing VC projects. I don't think it'll do the compiler settings mapping. GCC and VC are different compilers and are not compiler options compatible. So if you import a VC project for GCC you have to edit it. This applies to other compilers, too.

The import works well but as I told there are bugs.

I hope you would post clearer messages in future. Some of these statements can confuse users about the ability of C::B.

Ok, I understand this. But I do not understand the bug. But it does not matter! ;)
Can you post the #nr of the bug, so I can watch it?

Biplab

They are #010540, #010390, #010387. If your report is not matching with the mentioned bugs, then we'll add one more. ;)

As I said earlier Thanks a lot for Posting the feedback. Hopefully we can fix them soon. :)
Be a part of the solution, not a part of the problem.

Biplab

Moonkid,

This MSVC 6 import bug has been fixed. Now C::B will import library dirs, libraries, resource include dirs properly. It's in revision 3697.

Please test it and post if you face any problems.

Regards,

Biplab
Be a part of the solution, not a part of the problem.