Results 1 to 6 of 6

Thread: Execution of program can not find the file

  1. #1
    Join Date
    Dec 2009
    Posts
    296

    Execution of program can not find the file

    Hello,
    I started on Linux, and I developed a small program that uses a dynamic library that I have developed. Now I know different method to use a dll under windows but not Linux. For linking my program, I just used it. H library and linker like functions. So in the editing link. I guess we can also dynamically linker in the code. By cons I do not have to dll_export or .def or something that is done on windows. Briefly, my problem is that the execution of program can not find the file to load the program. I edit the environment variable with the path but it did not. Any help on this.
    Last edited by Gunner 1; 13-01-2010 at 11:40 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,755

    Re: Execution program can not find the file

    Hello,
    You'll have to post your compile command and linking. If you use a Makefile or another system, the posts also, and of course the execution of your order and the error message. All tags in code, if it is unreadable. Then maybe someone can help more regarding this topic. If I have any other for this solution then I will surely post back.

  3. #3
    Join Date
    Dec 2009
    Posts
    296

    Re: Execution program can not find the file

    Hello,
    Ok, but I wanted to know if my general sounding lib on linux was correct. Then I compile with NetBeans and compile and link, no problem, for cons to the execution it makes me, "Unable to load the lib XXX, not found" something like that. I think it does not know or seek it. So, any one have solution for this now.

  4. #4
    Join Date
    May 2008
    Posts
    3,316

    Re: Execution program can not find the file

    Hello,
    What environment variable do you speak? I have not (yet) played with the dynamic lib, but it seems to me that. So must be "installed" in the system so that it finds. Just as the. Dll windows if I'm your parallel. Windows agrees to seek the DLL in the working directory, but in general this is not the purpose of a DLL (which is to share your functionality to other apps, not necessarily housed in the same place as you). I do not think that Linux offers this possibility. This facility can be very simple, copy the style. So in / usr / lib. You can also, as do most apps, copy your library where you see fit, and put only one logical link to it in / usr / lib. These answers are to be taken lightly, because again I've never done this kind of stuff. The libs I created Linux are static, and I have not yet studied the dynamic aspect.

  5. #5
    Join Date
    Dec 2009
    Posts
    296

    Re: Execution program can not find the file

    Hello,
    First of thanks for giving me the tracks. Actually I guess the search. So should be similar to Windows except locally (I tried that did not work ). So yes I tried to put a link in / usr / lib. By cons I could add anything to / user / lib (I am root), can be command line, but how is it that I can not explore it? For the variable, I read that the search path. So specified in an environment variable (I do not know the name more "LIB_PATH ").

  6. #6
    Join Date
    May 2008
    Posts
    4,831

    Re: Execution of program can not find the file

    Hi,
    If you need the library, this is LD_LIBRARY_PATH, just any example, that is in general the libraries are located here, but it can depend on users also
    Code:
    export LD_LIBRARY_PATH = "/ usr/dev/lib/linux64"
    or put in / etc / environment. Hope this helps you. If you have more queries regarding this topic then do post back.
    Last edited by Macarenas; 13-01-2010 at 11:45 AM.

Similar Threads

  1. Replies: 3
    Last Post: 10-09-2012, 10:50 AM
  2. Replies: 4
    Last Post: 29-12-2010, 06:49 AM
  3. Delay in execution of C program?
    By Chrisch in forum Software Development
    Replies: 4
    Last Post: 03-10-2009, 10:52 AM
  4. How to find the correct program for unknown file ?
    By SoftwareGuy in forum Tips & Tweaks
    Replies: 0
    Last Post: 02-04-2009, 05:38 PM
  5. Why C, C++ program execution starts with main()
    By RadhaV in forum Software Development
    Replies: 4
    Last Post: 13-02-2009, 08:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,660,311.22827 seconds with 16 queries