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: Packages » Third-party lib packing HOWTO anybody?
icon5.gif  Third-party lib packing HOWTO anybody? [message #32413] Tue, 17 May 2011 05:38 Go to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Hi, %all%!

My situation is that I have to use some libs in my project (it's SDK for industrial cameras - in attachment). Now I would like to make a package containing headers and libs, making project easily distributable.

Click-it-all strategy doesn't help much (that's not a good thing BTW, but nevermind). Tried reading help and some topics around here but still can't get hang of mechanics.

Could you please explain me how do I make package I need?
  • Attachment: CPP.rar
    (Size: 82.32KB, Downloaded 361 times)
Re: Third-party lib packing HOWTO anybody? [message #32423 is a reply to message #32413] Tue, 17 May 2011 13:38 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
GaroRobe wrote on Tue, 17 May 2011 05:38

Hi, %all%!

My situation is that I have to use some libs in my project (it's SDK for industrial cameras - in attachment). Now I would like to make a package containing headers and libs, making project easily distributable.

Click-it-all strategy doesn't help much (that's not a good thing BTW, but nevermind). Tried reading help and some topics around here but still can't get hang of mechanics.

Could you please explain me how do I make package I need?


Hello Artem

Please include a very simple C/C++ console demo and I will return you a JAI folder and a JAI_Demo folder.


Best regards
Iñaki
Re: Third-party lib packing HOWTO anybody? [message #32441 is a reply to message #32423] Wed, 18 May 2011 04:08 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Here - the very first by-the-book example. Doesn't compile - I know. But don't see why. Libs dir seems so be referenced... Well, that's the example anyway Smile

Oh, right - I use VC10, VC10x64 and GCC (latest stable MinGW).
  • Attachment: Test_1.rar
    (Size: 1.31KB, Downloaded 346 times)

[Updated on: Wed, 18 May 2011 04:18]

Report message to a moderator

Re: Third-party lib packing HOWTO anybody? [message #32443 is a reply to message #32441] Wed, 18 May 2011 10:28 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Artem

Here I enclose you the files. They compile for me with MSC9 and MinGW, all in 32 bits. As I do not have the dll, the program does not run.
Although 64 bits is implemented, I cannot test it.

You will see the changes, it is very easy Smile :

- Folder Jai contains just the reference to the libs
- Fodler Jai_demo contains your demo with a few changes. Included compatibility with MinGW. Removed Eigen just to avoid any noise.
- Folder plugin_jai can be copied to uppsrc/plugin folder. .lib files have been renamed.

Please do not forget to include the include/lib/bin paths linking to plugin/jai/include, /lib and /bin folders.
  • Attachment: jai_all.7z
    (Size: 63.70KB, Downloaded 339 times)


Best regards
Iñaki
Re: Third-party lib packing HOWTO anybody? [message #32461 is a reply to message #32443] Thu, 19 May 2011 06:35 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

That's weird... I copy jai from plugin_jai to uppsrc/plugin folder and get
Quote:

LINK : fatal error LNK1104: cannot open file 'Jai_Factory32.lib'

Why? Somehow I don't get the way upp's building mechanism "thinks".
Re: Third-party lib packing HOWTO anybody? [message #32464 is a reply to message #32461] Thu, 19 May 2011 08:29 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Artem

Have you included this in addition to "Include" and "Path"? (last one for the .dll location):

index.php?t=getfile&id=3252&private=0
  • Attachment: pan.PNG
    (Size: 71.04KB, Downloaded 684 times)


Best regards
Iñaki
Re: Third-party lib packing HOWTO anybody? [message #32466 is a reply to message #32464] Thu, 19 May 2011 08:39 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Aha - makes sence! Smile

And is there any way to hard-code such requirements into packages? Like distribute libs in packages leaving only path requirements for the runtime?
Re: Third-party lib packing HOWTO anybody? [message #32468 is a reply to message #32466] Thu, 19 May 2011 10:04 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

GaroRobe wrote on Thu, 19 May 2011 08:39

Aha - makes sence! Smile

And is there any way to hard-code such requirements into packages? Like distribute libs in packages leaving only path requirements for the runtime?

Yes, it can be done... altough it is not widely used Smile You would have to specify the path in Project->Package organizer, adding a new link option (using context menu on right click in the right pane) and fill in something like -L../relative/path/to/lib/. The problem is that the syntax for GCC/MINGW is different than MSVC (don't know precise syntax), so you would have to add two separate entries, with when flags MSVC and !MSVC.

You could also use the very same way to directly add the lib into the linking command line. It might be simpler, but I am not sure if there aren't any hidden problems...

Best regards,
Honza
Re: Third-party lib packing HOWTO anybody? [message #32471 is a reply to message #32468] Thu, 19 May 2011 14:35 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

"Not widely used"? And what's the downside of this approach?
Re: Third-party lib packing HOWTO anybody? [message #32472 is a reply to message #32471] Thu, 19 May 2011 16:31 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

GaroRobe wrote on Thu, 19 May 2011 14:35

"Not widely used"? And what's the downside of this approach?

The only downside is that you have to write it separately for each compiler, but that is not the reason why it is not used. The real reason is that it is rarely needed Wink U++ is build around opensource libraries so they can be used in the form of source code, hence there is no need to distribute the libraries. Of course, I understand that sometime one has to use a proprietary library, but it is not very often. So that is why I said it is not widely used Smile I believe that most of the programmers are lazy poeple, so when they find out they are using library that is not in path, they just add it in their global settings (in build methods, as Koldo showed you) and forget about it Very Happy Both solutions are valid, one is simple for you while the other one makes it simple for people to whom you distribute your packages.

Honza
icon9.gif  Re: Third-party lib packing HOWTO anybody? [message #32479 is a reply to message #32472] Fri, 20 May 2011 01:22 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Okay now, guess I'm goin' a bit off the topic, but...

Could you please help me make this example run? It built without a prob now (a good thing), but crashes immidiately (a bad thing). Moreover, it crashes before a single step in debugger is performed and, half the times, drags TheIDE along to the nothingness (which is annoying).

Where should I start looking?

UPD: In x64 it actually complained not finding some dlls. Adding few from GenICam package made application launch, but I cannot debug it (because it is x64?).
The same trick with dlls didn't help with x86 version - still doesn't run.

[Updated on: Fri, 20 May 2011 03:20]

Report message to a moderator

Re: Third-party lib packing HOWTO anybody? [message #32493 is a reply to message #32479] Fri, 20 May 2011 23:53 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Artem

Please send all the files including dll to test it.


Best regards
Iñaki
Previous Topic: Acceptflags and ".FLAG" syntax
Next Topic: Subdirectories in packages
Goto Forum:
  


Current Time: Thu Mar 28 17:57:18 CET 2024

Total time taken to generate the page: 0.01508 seconds