Re: Can all functions of a static library be compiled in without any calls by Drew
Drew
Thu Jun 22 15:15:09 CDT 2006
It seems that this has become a non-issue as we will have to reference all
the functions (via function pointers) in the EXE anyhow in order to register
them with JVM.
> Suppose you managed to convince the linker not to remove these functions.
> How exactly does your customer plan to use them? You can't just load an
> EXE and call an arbitrary function in it, the way you would with a DLL.
The end user will define an environment variable which points to a Java
class
file. The app launches JVM and the class file executes calling our code via
JNI layer.
Anyhow thanks for your time,
Drew
"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:e3p6GCjlGHA.4268@TK2MSFTNGP05.phx.gbl...
> Drew <drew.nospam.myers@esrd.com> wrote:
>> A customer has now requested that that functionality now be provided
>> through the EXE. So we took the DLL specific code and made it a
>> static library project that we then link with the
>> EXE but since the EXE never actually calls any function in the static
>> library
>> they are all optimized away at link time.
>
> Suppose you managed to convince the linker not to remove these functions.
> How exactly does your customer plan to use them? You can't just load an
> EXE and call an arbitrary function in it, the way you would with a DLL.
>
> When you say "functionality be provided throught the EXE", in exactly what
> way should it be exposed? Embedding a static lib into an EXE does not make
> any sense, since there's no way to use it (as in, actually call functions
> in it).
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>