Adding a directory to a dynamic library path

This is a discussion on Adding a directory to a dynamic library path within the Windows Programming forums, part of the Platform Specific Boards category; I am not at all acquainted with windows programming. So this might be a noobie query. How do I add ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    4

    Adding a directory to a dynamic library path

    I am not at all acquainted with windows programming. So this might be a noobie query. How do I add a path to the dynamic library path? I have tried adding the path to environmental variables under Computer> properties> Advanced but this hasnt worked for me. I am trying to call a standalone application using MATLAB Compiler which should work if the directory has been added.

    Any suggestion is much appreciated.

    Thanks

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    DLL files are found using the normal PATH, so if you want to add a new directory to search for DLL's, you just add it to the existing PATH. If you are using command-line to start your application, you can use:

    PATH=%PATH%;x:\somewhere\someplace\in\the\system

    Otherwise, you need to set the path permanently in the System control panel.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    4
    how do I do the latter? I have added the path through the environment variable but that didnt work. I am not using command line to work. I am actually using MATLAB compiler.v40.

    OS;- Windows OS.
    C Compiler- TC v5.5
    MATLAB- v7.0

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    1) Windows Button + Pause/Break
    2) Advanced
    3) Enviroment Variables
    4) Scroll down in the System Variables until you see the variable PATH
    5) Click edit, and go to the end of the string put in a ; if there isn't already one there and pate in the path to your libs.

    It should work.
    If you're running it off the same command window you'll have to open a new one for the env variables to come into effect so it might be the same for Matlab... Try restarting the program.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding dynamic spaces
    By Snowtion in forum C Programming
    Replies: 5
    Last Post: 03-27-2003, 07:53 PM
  2. help, linker errors when adding library file to project
    By ngcfan525 in forum C++ Programming
    Replies: 1
    Last Post: 03-09-2003, 02:27 PM
  3. VS .NET: Adding a directory
    By K0NG3AL3R in forum C++ Programming
    Replies: 1
    Last Post: 12-03-2002, 12:22 PM
  4. adding library checks in configure.in
    By rohit in forum Linux Programming
    Replies: 1
    Last Post: 09-01-2002, 06:04 AM
  5. Fun with dll's
    By master5001 in forum Windows Programming
    Replies: 6
    Last Post: 06-21-2002, 05:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21