comp.lang.ada
 help / color / mirror / Atom feed
* Undefined reference to __fentry__ on Windows 7.
@ 2018-10-19  6:57 Petter Fryklund
  2018-10-19 17:53 ` Shark8
  2018-10-19 18:34 ` Simon Wright
  0 siblings, 2 replies; 6+ messages in thread
From: Petter Fryklund @ 2018-10-19  6:57 UTC (permalink / raw)


Hi all,

I'm trying to make system call or spawn using GNAT.OS_lib. Both results in undefined reference to __fentry__. What am I missing?

Regards,
Petter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undefined reference to __fentry__ on Windows 7.
  2018-10-19  6:57 Undefined reference to __fentry__ on Windows 7 Petter Fryklund
@ 2018-10-19 17:53 ` Shark8
  2018-10-19 18:34 ` Simon Wright
  1 sibling, 0 replies; 6+ messages in thread
From: Shark8 @ 2018-10-19 17:53 UTC (permalink / raw)


On Friday, October 19, 2018 at 12:58:00 AM UTC-6, Petter Fryklund wrote:
> Hi all,
> 
> I'm trying to make system call or spawn using GNAT.OS_lib. Both results in undefined reference to __fentry__. What am I missing?

Check the linker options; it looks like the entry isn't being picked up.
(I think it's something like -L[lib-name].)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undefined reference to __fentry__ on Windows 7.
  2018-10-19  6:57 Undefined reference to __fentry__ on Windows 7 Petter Fryklund
  2018-10-19 17:53 ` Shark8
@ 2018-10-19 18:34 ` Simon Wright
  2018-10-21  1:44   ` alby.gamper
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Wright @ 2018-10-19 18:34 UTC (permalink / raw)


Petter Fryklund <petter.fryklund@atero.se> writes:

> I'm trying to make system call or spawn using GNAT.OS_lib. Both
> results in undefined reference to __fentry__. What am I missing?

Googling __fentry__ finds
https://unix.stackexchange.com/questions/259591/linux-kernel-missing-fentry-symbol,
don't know if that's any use


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undefined reference to __fentry__ on Windows 7.
  2018-10-19 18:34 ` Simon Wright
@ 2018-10-21  1:44   ` alby.gamper
  2018-10-21  7:50     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 6+ messages in thread
From: alby.gamper @ 2018-10-21  1:44 UTC (permalink / raw)


On Saturday, October 20, 2018 at 5:34:55 AM UTC+11, Simon Wright wrote:
> Petter Fryklund <petter.fryklund@atero.se> writes:
> 
> > I'm trying to make system call or spawn using GNAT.OS_lib. Both
> > results in undefined reference to __fentry__. What am I missing?
> 
> Googling __fentry__ finds
> https://unix.stackexchange.com/questions/259591/linux-kernel-missing-fentry-symbol,
> don't know if that's any use

Hi Peter

I am using msys2/mingw64 FSF 8.1 on windows 10 and the below sample works fine
(ie I get the "cmd /?" output in my debug window, note I am using my
Visual studio ada addin, called "Visual Ada") Note However that the Success
output parameter comes back as false! Not sure why. But it does seem to work.

Alex

--------------------------------------------------------------------------------
with GNAT.os_lib;
--------------------------------------------------------------------------------
procedure ConsoleApp1 is
    Args    : GNAT.os_lib.argument_list(1..1) := ( others => new string(1..2) );
    Success : Boolean;
begin
    Args(1).all := "/?";
    GNAT.os_lib.spawn("cmd", Args, Success);
end;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undefined reference to __fentry__ on Windows 7.
  2018-10-21  1:44   ` alby.gamper
@ 2018-10-21  7:50     ` Dmitry A. Kazakov
  2018-10-22  9:58       ` Petter Fryklund
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry A. Kazakov @ 2018-10-21  7:50 UTC (permalink / raw)


On 2018-10-21 03:44, alby.gamper@gmail.com wrote:

> I am using msys2/mingw64 FSF 8.1 on windows 10 and the below sample works fine
> (ie I get the "cmd /?" output in my debug window, note I am using my
> Visual studio ada addin, called "Visual Ada") Note However that the Success
> output parameter comes back as false! Not sure why.

Because cmd /? sets ERRORLEVEL to 1, which is then reflected in Success.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undefined reference to __fentry__ on Windows 7.
  2018-10-21  7:50     ` Dmitry A. Kazakov
@ 2018-10-22  9:58       ` Petter Fryklund
  0 siblings, 0 replies; 6+ messages in thread
From: Petter Fryklund @ 2018-10-22  9:58 UTC (permalink / raw)


Hi all,

Profiling is not supported on 64 bit windows, that was the problem.

Regards,
Petter


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-22  9:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19  6:57 Undefined reference to __fentry__ on Windows 7 Petter Fryklund
2018-10-19 17:53 ` Shark8
2018-10-19 18:34 ` Simon Wright
2018-10-21  1:44   ` alby.gamper
2018-10-21  7:50     ` Dmitry A. Kazakov
2018-10-22  9:58       ` Petter Fryklund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox