Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Usage of images in different .h and .cpp files
Re: Usage of images in different .h and .cpp files [message #27608 is a reply to message #27606] Sun, 25 July 2010 18:51 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

You got it almost right Javier. The only problem is that iml_source.h must be included only once.

How it works: iml_header.h provides declarations, while iml_source.h provides definitions. So you must use iml_source.h only once, doesn't matter where, and only put the iml_header.h code in the rest of the places where necessary. Otherwise you get linker errors about multiple definitions.

In your case everything you have to do to get it work is to remove the definition from one of the cpp files (that is step 2 or step 4).

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Custom Control
Next Topic: How to compare child in function virtual void ChildMouseEvent with ctrl’s value.
Goto Forum:
  


Current Time: Sun Jun 22 13:41:10 CEST 2025

Total time taken to generate the page: 0.06810 seconds