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 » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » Insert iml include typo
Insert iml include typo [message #39796] Tue, 30 April 2013 01:20 Go to next message
busiek is currently offline  busiek
Messages: 64
Registered: February 2011
Location: Poland
Member
Assist->Insert->*.iml include generates line
#include <Draw/iml_header.h>
instead of
#include <Draw/iml.h>

Re: Insert iml include typo [message #39799 is a reply to message #39796] Tue, 30 April 2013 14:43 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

busiek wrote on Tue, 30 April 2013 01:20

Assist->Insert->*.iml include generates line
#include <Draw/iml_header.h>
instead of
#include <Draw/iml.h>



Hi busiek,

I believe that this is not a bug, it is a feature Smile If you look at iml.h, you'll see that it just includes iml_header.h and iml_source.h. The first one includes only declarations, the second one actual definitions. So iml_header.h can be included multiple times on various places of your code as needed, while iml_source.h must be only present in one .cpp file (for each iml file), otherwise multiple definition error occurs when compiling. So it kind of make sense that the insert helper only gives you the header part, the source part should be inserted with a bit more thinking Smile

Best regards,
Honza
Re: Insert iml include typo [message #39800 is a reply to message #39799] Tue, 30 April 2013 14:54 Go to previous message
busiek is currently offline  busiek
Messages: 64
Registered: February 2011
Location: Poland
Member
I see. I was not aware of such clever design. This is in fact a feature. Thank you for explanation.

I proceeded as newbie while creating new icons. After I created an icon, I searched a menu for code generation and put it into sources. Of course linker raised an error. I looked into gui tutorial where iml.h was used instead of iml_header.h without understanding why, but now I understand Smile. I was too lazy to search the documentation or forum this time.

Jakub
Previous Topic: sch file editor
Next Topic: is assist++ ready for c++11?
Goto Forum:
  


Current Time: Fri Apr 19 10:30:19 CEST 2024

Total time taken to generate the page: 0.03521 seconds