nd after I have selected the icon some code like that is generated:
Code: [Select]
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 work on any other PC.
of course this won't work. But you should also be able to put relative paths there. Something like _T("res\\myicon.ico")
If you use this approach there are some codeblocks pitfalls:
1) If you run your app within codeblocks your app will search in the project folder for the "res" subfolder:
PATH_TO_YOUR_PROJECT_BASE_FOLDER\res\myicon.ico
2) But if you run your app directly without codeblocks it will search in the application base folder:
PATH_TO_YOUR_EXECUTABLE_FILE\res\myicon.ico
so if you run it outside codeblocks but in the folder structure of codeblocks:
PATH_TO_YOUR_PROJECT_BASE_FOLDER\bin\debug\res\myicon.ico
This is because codeblocks has two targets: build and release and if you make the search path for resources (all relative paths of your app) the base path of the project you don't have to copy the resources into two folders. Of course there is a setting to change this...
As i told you above i have no idea how to embed the icon into the exe. But if you post a full build log how stahta01 suggested maybe we can help you.