Results 1 to 8 of 8

Thread: help on dll and .NET2003

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default help on dll and .NET2003

    Hi, my project needs sdl.dll that it's in c:\sdl\; I can put dll in c:\win\system32 or in myProjects dir; but a way to to link dll to my project without change position of dll?
    Thanks
    Regards

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help on dll and .NET2003

    Either add the path to your sd.dll in the environment variables->path or put the dll in the system32 dir which is already set in the path.

  3. #3
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: help on dll and .NET2003

    ? enviromets variables in Windows? Isn't possible a link dll to only my projects? (with .net2003 or .pro file)
    Regards

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help on dll and .NET2003

    The safest way is to put that DLL in the same directory where the executable is.

    To use that DLL in your project you need an import library. Look for a sdl.lib (or libsdl.a if you use MinGW). Then add:
    Qt Code:
    1. LIBS += -L<path to the directory with .lib file> -lsdl
    To copy to clipboard, switch view to plain text mode 
    to your .pro file.

  5. #5
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: help on dll and .NET2003

    sorry it wasn't sdl but glew32.dll
    in my .pro I have the line
    Qt Code:
    1. win32:LIBS += C:\glew\lib\glew32.lib
    To copy to clipboard, switch view to plain text mode 
    do I need insert this?
    Qt Code:
    1. LIBS += - LC:\glew\lib\ -lglew32
    To copy to clipboard, switch view to plain text mode 

    I'm a bit confused; Help me is this is correct: If i link .lib in .pro, is dll necessary?
    I'm using this in .pro win32:LIBS += C:\glew\lib\glew32.lib; am I linking glew in static way? (if so, why my application require me glew.dll when I launch the application?)
    I hpe you're understanding what I'm saying...
    Thanks
    Regards

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help on dll and .NET2003

    Quote Originally Posted by mickey
    do I need insert this?
    Qt Code:
    1. LIBS += - LC:\glew\lib\ -lglew32
    To copy to clipboard, switch view to plain text mode 
    No.

    If i link .lib in .pro, is dll necessary?
    Yes, that .lib file is just an import library. It doesn't implement any functionality from the DLL --- it only imports symbols from it, so you don't have to do it by hand.

  7. #7
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: help on dll and .NET2003

    in other word: is there a way to say myapplication (through .pro or from .net2003) 'go to take glew.dll in c:\glew32\' ??
    Thanks
    Regards

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help on dll and .NET2003

    Quote Originally Posted by mickey
    is there a way to say myapplication (through .pro or from .net2003) 'go to take glew.dll in c:\glew32\' ??
    AFAIK, no.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.