User forums > Using Code::Blocks
try to compile wxWidgets samples
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
..
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.
--- End quote ---
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
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
Navigation
[0] Message Index
[#] Next page
Go to full version