Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How do i use resource.rc files with eclipse
How do i use resource.rc files with eclipse [message #250534] Fri, 29 February 2008 18:30 Go to next message
Eclipse UserFriend
Originally posted by: biracruz.cemig.com.br

Hi,

I am a beginner to use eclipse. I am using windows with WIN32API to build
my applications. Before i use eclipse i was using DEV-c++ to build my
application and i want to migrate my programs to eclipse because a want to
use with linux too and i want to use only one interface to both systems.

I want to know how i can configure eclipse to link a resource file(.rc)
into my program. I am building a simple interface with buttons, edits and
another components like menu. All documentation that i found tell me the
best way to build a menu is using a file resource (Example: menu.rc) where
i can share this configurations with many other applications. I looked for
into MSDN and WEB but i didnŽt find any example to show how i can use this
resource
with eclipse.

Recently i came back to Dev-C++ and discover into log compilation that
windres.exe is used to create an object to link with final program.
I tried to configure a empty file named menu.rc like my resource file into
eclipse. I created main.cpp and main.h files to compile. The program
compile but the interface doesnŽt show menu.

I looked for a configuration to use windres.exe to create menu.o to link
to final program but until this moment i fail many times. Can you help?

Thank you

Ubirajara
Re: How do i use resource.rc files with eclipse [message #794945 is a reply to message #250534] Thu, 09 February 2012 22:21 Go to previous message
Trueman C is currently offline Trueman CFriend
Messages: 8
Registered: February 2011
Junior Member
Try this:
Project | Properties | C/C++-Build | Settings | Build Steps | Pre-Build Steps | Command: windres --use-temp-file -i..\MyProject.rc -o..\MyProject_rc\MyProject_rc.o

Project | Properties | C/C++-Build | Settings
Tool Settings | MinGW C++ Linker | Miscellaneous | Other Objects
click the icon 'Add'
fill in "C:\MyWorkspace\MyProject\MyProject_rc\MyProject_rc.o"

'MyWorkspace' and 'MyProject' replace with whatever is fitting for your purpose

You have to add the folder .\MyProject_rc before you build

The path to windres.exe must be known to eclipse

An read this:
http://wiki.wxwidgets.org/Talk:Eclipse,_CDT_%26_MingW_Setup_Guide

[Updated on: Thu, 09 February 2012 23:06]

Report message to a moderator

Previous Topic:Eclipse Mozilla as Browser Context Menu
Next Topic:can connect to dl.google.com but not download.eclipse.org
Goto Forum:
  


Current Time: Fri Jul 23 17:01:10 GMT 2021

Powered by FUDForum. Page generated in 0.02581 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top