mindofbeholder
mindofbeholder

Reputation: 83

How do I add an icon to my C++ compiled executable when using Eclipse?

So i'm creating a small program and I want to use a custom icon for it's .exe. I'm using the Microsoft Visual C++ toolchain in Eclipse.C/C++ Any help is much appreciated!

Upvotes: 1

Views: 1760

Answers (2)

mindofbeholder
mindofbeholder

Reputation: 83

Got it figured out! I created a file called icon.rc and added the following line:

id ICON "\path\to\icon.ico"

It automatically compiled it and added it to my executable.

Upvotes: 1

Charles Burns
Charles Burns

Reputation: 10602

Executable icons are handled differently for different operating systems. I assume that you are writing a Windows C++ program (your question doesn't have a tag for your target OS or OSes). In Windows, the icon is stored in a "resource", which can be separate or part of your executable.

I think a little reading is necessary on your part, though I'll offer search suggestions:

  • visual c++ [version] resource editor
  • eclipse windows resource icon

Upvotes: 0

Related Questions