QtCreator 2.2.1 don’t load DLLs
I am using QtCreator on Windows, and since I have switched from 2.0.1 to the 2.2.1 I have to setup my own libraries’ path to the executable path.
I have a subdir project structure, and in each library .pro file I have
- DESTDIR = $$MY_LIB_DIR
- TARGET = $$MY_LIB_NAME
In the main project, for each library I have
- win32{
- win32-g++{
- LIBS += -L$$MY_LIB_DIR -l$${MY_LIB_NAME}
- }
- else{
- #MSVC
- }
- }
- else{
- LIBS += -$$MY_LIB_DIR/lib -l$${MY_LIB_NAME}
- }
before I was able to launch the executable from QtCreator whatever was the value of MY_LIB_DIR (of course outside of QtCreator it need to be on the path), but now it just doesn’t launch. I need to set MY_LIB_DIR to the executable directory.
2 replies
You do. [goo.gl]
Windows then searches for the DLLs in the following sequence:
- The directory where the executable module for the current process is located.
- The current directory.
- The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
- The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
- The directories listed in the PATH environment variable.
You must log in to post a reply. Not a member yet? Register here!



