To be really precise it´s a wxSmith question, but as far I know wxSmith is some kind of CodeBlocks plugin, so the question is in some way related to CodeBlocks.
With resource file you are meaning that .rc file, right? That .rc file contain the icon for exe, and it worcks without big problems, the only thing that can be called problem there, is the fact that the name of the icon must be set manually.
For seting the icon of a frame there is an other way in wxSmith:
(http://s19.radikal.ru/i192/1704/39/55e050918101.png)
(http://s019.radikal.ru/i612/1704/71/30bf5378de13.png)
and after I have selected the icon some code like that is generated:
wxIcon FrameIcon;
FrameIcon.CopyFromBitmap(wxBitmap(wxImage(_T("C:\\<path>\\myicon.ico"))));
SetIcon(FrameIcon);
<path> stands for the full path, and this is exactly the problem preventing it to worck on any other PC.
The solution from this thred: http://forums.codeblocks.org/index.php/topic,9047.new.html#new doesn´t worck, as I also wrote there.
If you post a full build log, someone might see the cause of your issue!
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
You are asking for error mesages produced by compiler, right?
If I am using wxSmith to add icon to frame, there is no error mesages, but geting runtime erors on every other PC. The reason for that runtime errors is known, so no need to diskus it, as such solution is useles for me.
when I try your solution from that thread the error mesage looks like that:
(http://s014.radikal.ru/i328/1704/48/8d1b758f0950.png)
Line 30 in that .cpp file looks like this:
Frame->SetIcon(wxIcon(aaaa));
in the .rc file there is a line like this:
Sorry if I misunderstood you again.
You are asking for error mesages produced by compiler, right?
yes. BUT you should read the link he posted... Your image is useless. Please follow exactly the steps in the link. And if you have no luck, follow EXACTLY the last step:
f you have no luck, you can try to ask in the forum, but read first "How do I report a compilation problem on the forums"
Just wan to make one thing clear, have no problem with embading icon into exe, the problem is only with the icon for the frame.
By embedding i mean to build into the exe, so you don't have to ship a .ico file, but it is packed into the exe
Have you tried the relative paths?
Not really familiar with that build stuff, so this was already a problem in previous discusion with Tim, and even googletranslator is not helpfull in this case.
I haven´t tried your code with relative path, but have just tried to edit the code line to:
FrameIcon.CopyFromBitmap(wxBitmap(wxImage(_T("myicon.ico"))));
The icon is in the prject folder, so it worcked, but with this solution I still need to destribute the icon with the exe and this is something I don´t want to do. wxDev has put the frame icon into the exe to and after looking exactlly at the code produced by wxDev, looks like it is using something similar, or may be exactly the same, to xpm. So looks like I have to generate .xpm file from the icon and than include somehow that .xpm file.
Also I read in the documentation something about windows handels, no idea if this could be a solution, as im worcking only on Windows and this is the only target OS.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
Also for me personally the error mesage make sence, as "aaaa" wasn´t really declared, exept in the .rc file, but that file seems not to be conected to the sources.
yes... the compiler needs to know where to find the resource file, but we don't know where the compiler searches. This is all displayed in the compiler command line and the command line is posted in the "build log" tab and not in the "build message" tab. You posted the later and this has no usefull information for us.
We told you 100 times to read ALL the faq... Sometimes you simply have to follow ALL instructions and don't complain, or think this is not related to you...
Like i said not familiar with the comandline, so I sought what I posted must be the "build log". However I thinK to know where the problem was, I have to use the wxICON macro and I typed it wrong, so it´s recognized as a constructor. The corect line must look like this:
Frame->SetIcon(wxICON(aaaa));
Really stupied error, will tell tomorow if it worcked.
Like expected, it worcked. So now I am really looking like an idiot, sorry for wasting everibodies time. Think I have worcked with maxscript, which is kase insensible, to often. So just to explain, in maxscript is wxICON and wxIcon exactlly the same, but not in C++.