Author Topic: try to compile wxWidgets samples  (Read 10303 times)

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
try to compile wxWidgets samples
« on: March 01, 2007, 08:01:51 pm »
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. :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: try to compile wxWidgets samples
« Reply #1 on: March 01, 2007, 08:28:27 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: try to compile wxWidgets samples
« Reply #2 on: March 02, 2007, 07:05:59 am »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: try to compile wxWidgets samples
« Reply #3 on: March 02, 2007, 07:17:36 am »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: try to compile wxWidgets samples
« Reply #4 on: March 02, 2007, 07:42:02 am »
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.

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: try to compile wxWidgets samples
« Reply #5 on: March 04, 2007, 08:38:01 pm »
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!?

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: try to compile wxWidgets samples
« Reply #6 on: March 04, 2007, 08:57:55 pm »
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.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: try to compile wxWidgets samples
« Reply #7 on: March 05, 2007, 03:12:37 am »
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.

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.

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: try to compile wxWidgets samples
« Reply #8 on: March 05, 2007, 05:37:04 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.

Are you talking about importing the VC project and then compiling it with GCC?

Yes.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: try to compile wxWidgets samples
« Reply #9 on: March 05, 2007, 06:53:57 am »
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.

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.

I had to do all build settings manualy as I described in the mainpost.
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.

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: try to compile wxWidgets samples
« Reply #10 on: March 05, 2007, 04:02:16 pm »
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?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: try to compile wxWidgets samples
« Reply #11 on: March 05, 2007, 04:52:27 pm »
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.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: try to compile wxWidgets samples
« Reply #12 on: March 14, 2007, 03:28:30 pm »
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.