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 » Developing U++ » U++ Developers corner » Ideas on U++ as library
Ideas on U++ as library [message #45645] Fri, 18 December 2015 14:40 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Moving this discussion here, so I don't hijack original discussion about PR.

mirek wrote on Fri, 18 December 2015 11:01
dolik.rce wrote on Thu, 17 December 2015 21:08

I remember some experiments with converting upp files to Visual Studio projects, waf based builds and of course the universal makefile, but frankly, all of those are quite difficult to use without previous knowledge of U++. Making a library that could be just linked against would help a lot, but I know this has already been tried several times before, with mixed results.


Well, I am afraid this is still mostly the question of INITBLOCK.

Should we drop INITBLOCK and require manual registration of modules used?

Mirek


Do you mean that INITBLOCKs cause trouble with building icpp files or that they are not called in library? I believe the first issue is more or less solved, so I'll assume the second is what you meant. Correct me if I'm mistaken.

I haven't really think any of this through, but here are some ideas:

1) Some script during library build goes through all code and gathers INITBLOCKs, then generates code that executes them in init function/DllMain. It might require some changes to how INITBLOCK macro is defined when building as library, but that should be simple.

2) Ignore INITBLOCKs when building library and allow manual registration of everything the user needs. This would require good documentation of what can registered When using static linking, everything could still work as of now.

3) Putting all INITBLOCKs content into separate header files. It would then be users responsibility to include necessary headers exactly once into an application. This would make the manual initialization quite simple (one include per package) and it would also simplify compilation - you'd just need to special handle one file that includes all the initialization headers, instead of all icpp files.

Any other ideas are welcome Smile If I have some spare time during holidays, I'll try to experiment with this a bit.

Having a dynamic library would lower the barrier for newbies significantly. I believe many leave U++ before trying it because a) it seems to be slow, when building everything for the first time or b) it requires static linking.

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Considering different approach to Win32 release
Next Topic: Parallel sort
Goto Forum:
  


Current Time: Sun Apr 28 00:47:35 CEST 2024

Total time taken to generate the page: 0.05574 seconds