This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 156962 - Dynamic libraries linking + "Image not found" - How SUN should fix this recurrent matter
Summary: Dynamic libraries linking + "Image not found" - How SUN should fix this recur...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P4 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 16:50 UTC by laurent01
Modified: 2014-04-14 14:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description laurent01 2009-01-16 16:50:15 UTC
When you link a (dynamic) library build by the developer with a, for example, main.c programme, the run window opened 
gives you the following message : "Image not found".

Different tests were made with GNU development tools(within a terminal window) and Xcode. Both - GNU and Xcode - give 
the same error not authorizing the run of the software build. However, with these two IDEs, a new indication allows us 
to understand what (not) happend. In fact, the library must be in the folder /usr/local/lib the default value).

When you copy the library in this default folder, the software does run.

What I have tested : 
- in NetBeans : using the -Lthe_path_of_our_library option, as for GNU gcc compiler/linker. It seems that NetBeans 
doesn't take this option into account. With the library copied in /usr/local/lib, however, it works as I said before ;
- in Xcode : copying the library into /usr/local/lib makes the software running. However, when it is not there, it 
fails. The tip found thanks to Xcode : in the Build Settings options of the project, when I defined a new option from 
the developer, entering LD_LIBRARY_PATH with the value Lthe_path_of_our_library makes the software running, even though 
the library is not in /usr/local/lib.

Please kindly find below how you should have to fix this recurrent error. So, what I propose to you for the next 
versions of NetBeans :
- possibility 1 : when you indicate to NetBeans what library to load 'select by browsing), force NetBeans to add the 
new path library (-L option) to Lthe_path_of_our_library (if this, option works with this IDE) ;
- possibility 2 : creating a new configuration/option window or menu to always update LD_LIBRARY_PATH (NB In the APPLE 
ADC Developer documentation, it seems that three related flags could be set) ;
- maybe other possibilities.

Hoping you a good receipt. I look forward to hearing from you soon.
Yours faithfully,



Laurent Delphin
Comment 1 Alexander Pepin 2010-10-27 14:17:58 UTC
please evaluate.
Comment 2 Leonid Lenyashin 2010-11-13 12:45:12 UTC
It might make sense to create a special sub-folder to let's say .netbeans directory and automatically add a link to all user-built shared objects there. The same folder needs to be added to LD_LIBRARY path when run/debug a program in IDE.