Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. How setenv before loading the dll file?
Forum Updated to NodeBB v4.3 + New Features

How setenv before loading the dll file?

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 424 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by
    #1

    now that the program has to import the third dll files
    and is there any possible that setenv path dynamiclly before the program started?
    or setenv automatically ?Now I have to set the path varieties manually before the program started.If I moved the program file ,the sysmtem path cant work.So is there any good ideas?

    Os:windows 7 x86_64
    Compile Tool:Mingw32

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2
      • start your program through a script (.bat file) which will set up all paths and environment variables
      • if this is about third party libraries, you can load your app first, then set env using qputenv, then load your libs using QLibrary
      • install libraries system-wide so that all apps will have access to them regardless of where they are
      • compile your app statically to include all code inside
      • create a launcher for your app which will set up QProcessEnvironment and then launch your main app through QProcess

      As you can see, there are many ways to solve this. Which solution is correct depends on particular details of your situation and your preference.

      (Z(:^

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved