From: John Smith <yoursurrogategod@gmail.com>
Subject: Re: The best possible way to call a function in a shared library
Date: Wed, 11 Oct 2017 15:57:33 -0700 (PDT)
Date: 2017-10-11T15:57:33-07:00 [thread overview]
Message-ID: <307494b9-c79d-4e8a-887c-3a588374b082@googlegroups.com> (raw)
In-Reply-To: <orm5oj$46t$1@franka.jacob-sparre.dk>
On Wednesday, October 11, 2017 at 6:25:25 PM UTC-4, Randy Brukardt wrote:
> "John Smith" <yours....@gmail.com> wrote in message
> news:18781206-12b4-4d.......@googlegroups.com...
> ...
> > I've had the binary that uses the *.DLL having it include the
> > library via the *.gpr file and that used to work. When it comes
> >to finding the DLL, that should be handled by the related GPRs.
>
> No. Loading (seeparate) DLLs is handled by Windows, and you have to follow
> the Window's rules for that. The compiler has nothing to do with it, and
> thus project files have nothing to do with it. This works much like the
> running of any executable -- that's a Windows function, not a
> compiler/linker function.
>
> Several people have suggested that you place the .DLL (temporarily) in a
> place where Windows will always look for it (like System32) to find out
> whether or not it is a loading problem or some compilation problem (where
> further playing with project files will be profitable). I'd suggest doing
> that and (if necessary) providing the results here.
>
> Randy.
Putting the DLL file into the same directory as the executable will cause the binary to run as it should.
Putting the same DLL into C:\Windows\System32 gives me the exception that the DLL in question cannot be found.
Over the weekend, I somehow managed to keep the binary in its bin/debug directory and compile my executable and run it flawlessly. I know that this was not a static library because I checked that there were no *.a files before I compiled the executable (also, the compiled program was quite small in size when compared to the executable created using a static library.) I wish I had somehow saved the state of these files somehow just to be sure that if I screw them up in the future I can go back to that working state (but I did not and this was my fault.)
next prev parent reply other threads:[~2017-10-11 22:57 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-01 21:06 The best possible way to call a function in a shared library John Smith
2017-10-01 23:51 ` John Smith
2017-10-02 7:15 ` Dmitry A. Kazakov
2017-10-02 11:12 ` John Smith
2017-10-02 11:32 ` Dmitry A. Kazakov
2017-10-02 22:44 ` John Smith
2017-10-03 7:14 ` Dmitry A. Kazakov
2017-10-03 11:32 ` John Smith
2017-10-03 13:43 ` Dmitry A. Kazakov
2017-10-03 23:28 ` John Smith
2017-10-04 2:10 ` John Smith
2017-10-04 8:10 ` Dmitry A. Kazakov
2017-10-04 11:23 ` John Smith
2017-10-04 11:48 ` Dmitry A. Kazakov
2017-10-04 11:54 ` John Smith
2017-10-04 11:59 ` Dmitry A. Kazakov
2017-10-04 12:04 ` John Smith
2017-10-04 12:47 ` Dmitry A. Kazakov
2017-10-04 15:03 ` Simon Wright
2017-10-04 23:24 ` John Smith
2017-10-05 23:55 ` John Smith
2017-10-06 2:21 ` John Smith
2017-10-06 6:46 ` Dmitry A. Kazakov
2017-10-06 11:30 ` John Smith
2017-10-06 13:26 ` Dmitry A. Kazakov
2017-10-06 18:57 ` Simon Wright
2017-10-06 19:18 ` Dmitry A. Kazakov
2017-10-07 2:47 ` John Smith
2017-10-07 3:57 ` John Smith
2017-10-07 8:25 ` Dmitry A. Kazakov
2017-10-07 11:52 ` Simon Wright
2017-10-07 12:57 ` John Smith
2017-10-07 13:19 ` Dmitry A. Kazakov
2017-10-07 13:28 ` John Smith
2017-10-10 3:39 ` John Smith
2017-10-10 13:15 ` Dmitry A. Kazakov
2017-10-11 0:38 ` John Smith
2017-10-11 1:18 ` Anh Vo
2017-10-11 1:22 ` John Smith
2017-10-11 1:40 ` Anh Vo
2017-10-11 7:08 ` Dmitry A. Kazakov
2017-10-11 12:09 ` John Smith
2017-10-11 13:43 ` Dmitry A. Kazakov
2017-10-11 22:25 ` Randy Brukardt
2017-10-11 22:57 ` John Smith [this message]
2017-10-13 0:38 ` John Smith
2017-11-06 6:25 ` Robert Eachus
2017-10-03 14:22 ` Dennis Lee Bieber
2017-10-02 7:30 ` Dmitry A. Kazakov
2017-10-11 14:31 ` John Smith
2017-10-11 15:50 ` John Smith
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox