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++ Library support » U++ Library : Other (not classified elsewhere) » Using binary form of upp
Using binary form of upp [message #20372] Sun, 15 March 2009 19:06 Go to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
Hello all,

I do a little test today. I tried to link upp libraries generated with TheIDE ( MSC9 optimal ) with visual studio 2008.

For example i created a new projet with no sources, only binaries needed by UWord example

- UWord.obj
- bmp.lib
- Core.lib
- Draw.lib
- ...

Look a the resulting uword application (screenshot in attachment)

Is there a tip for invoking microsoft link.exe to correctly link upp based applications ?

Thanks for your help

Re: Using binary form of upp [message #20373 is a reply to message #20372] Sun, 15 March 2009 19:37 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
Ok i found the problem, i missed .obj files ( like CtrlLib.obj ) which are not included on .lib.

Does someone can explain why ?
Re: Using binary form of upp [message #20378 is a reply to message #20373] Mon, 16 March 2009 00:59 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
cocob wrote on Sun, 15 March 2009 14:37

Ok i found the problem, i missed .obj files ( like CtrlLib.obj ) which are not included on .lib.

Does someone can explain why ?


There are *.icpp file in UPP, which should be linked directly into an application. In your case this is CtrlLib.icpp.

UPP is full of tricks you will never find anywhere else.


Regards,
Novo
Re: Using binary form of upp [message #21073 is a reply to message #20372] Fri, 01 May 2009 12:20 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
Can you explain me the difference between linking the obj file directly with the application and to put it on a statitc library ?

cocob
Re: Using binary form of upp [message #21078 is a reply to message #20378] Fri, 01 May 2009 23:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Novo wrote on Sun, 15 March 2009 19:59

cocob wrote on Sun, 15 March 2009 14:37

Ok i found the problem, i missed .obj files ( like CtrlLib.obj ) which are not included on .lib.

Does someone can explain why ?


There are *.icpp file in UPP, which should be linked directly into an application. In your case this is CtrlLib.icpp.

UPP is full of tricks you will never find anywhere else.



Well, I am really sorry about this trick... But I just did not seen the way around.

The problem was to provide automatic initialisation of all used modules. .icpp is the solution...

In practice, I agree we will have to find a way around if we are going to provide library form. Hopefully, "init" is the step in direction...

Mirek
Re: Using binary form of upp [message #21079 is a reply to message #21073] Fri, 01 May 2009 23:28 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cocob wrote on Fri, 01 May 2009 06:20

Can you explain me the difference between linking the obj file directly with the application and to put it on a statitc library ?

cocob


Putting in static library means that parts get included only if they are referenced.

BUT, some modules, like Image decoders (PNG, BPM, GIF) perform "self-registration" - they register themself using global constructors to Draw module and once registered, according formats get loaded automatically.

Anyway, if you put them just to .lib, no symbol from such codec package is referenced by the code and they do not get global constructors registered. All of codec code is excluded from resulting binary. No registration of "GIF" happens and you cannot load GIF...

Mirek
Previous Topic: [FEATURE REQUEST] html viewer
Next Topic: Google Translator library
Goto Forum:
  


Current Time: Thu Mar 28 13:18:38 CET 2024

Total time taken to generate the page: 0.01572 seconds