Thread: Adding a directory to a dynamic library path

  1. #1
    Registered User
    Join Date
    Sep 2007

    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.


  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    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:


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

    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
    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
    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
    By rohit in forum Linux Programming
    Replies: 1
    Last Post: 09-01-2002, 05:04 AM
  5. Fun with dll's
    By master5001 in forum Windows Programming
    Replies: 6
    Last Post: 06-21-2002, 04:24 PM