qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  qmp_* functions into 'kvm-all.c'
@ 2014-02-10 18:18 Vincent KHERBACHE
  2014-02-10 19:45 ` Andreas Färber
  2014-02-10 21:59 ` Paolo Bonzini
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent KHERBACHE @ 2014-02-10 18:18 UTC (permalink / raw)
  To: qemu-devel

Hi all,

I just created a new QMP command following the
'writing-qmp-commands.txt' howto.

It's works well by adding the corresponding function into 'qmp.c', but
when I want to insert the function in 'kvm-all.c' (which is my goal) I
get an 'undefined reference' error to the function from 'qmp-marchal.c'
during the compilation.

I already included "qmp-commands.h" in 'kvm-all.c' preprocessor but it
didn't solve the problem.


Does someone know how to fix it (or why it happens) ?
Thanks.


Regards,
-- 
Vincent KHERBACHE
PhD Student at INRIA Sophia (FRANCE)

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

* Re: [Qemu-devel] qmp_* functions into 'kvm-all.c'
  2014-02-10 18:18 [Qemu-devel] qmp_* functions into 'kvm-all.c' Vincent KHERBACHE
@ 2014-02-10 19:45 ` Andreas Färber
  2014-02-10 21:14   ` Vincent KHERBACHE
  2014-02-10 21:59 ` Paolo Bonzini
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2014-02-10 19:45 UTC (permalink / raw)
  To: Vincent KHERBACHE, qemu-devel; +Cc: Paolo Bonzini, Luiz Capitulino

Hi,

Am 10.02.2014 19:18, schrieb Vincent KHERBACHE:
> I just created a new QMP command following the
> 'writing-qmp-commands.txt' howto.
> 
> It's works well by adding the corresponding function into 'qmp.c', but
> when I want to insert the function in 'kvm-all.c' (which is my goal) I
> get an 'undefined reference' error to the function from 'qmp-marchal.c'
> during the compilation.

Have you thought of also adding a corresponding function to kvm-stub.c
for the targets not linking kvm-all.c?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] qmp_* functions into 'kvm-all.c'
  2014-02-10 19:45 ` Andreas Färber
@ 2014-02-10 21:14   ` Vincent KHERBACHE
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent KHERBACHE @ 2014-02-10 21:14 UTC (permalink / raw)
  To: Andreas Färber, qemu-devel; +Cc: Paolo Bonzini, Luiz Capitulino

That's right !

Problem solved by adding the stub function to 'kvm-stub.c'.

Thank you very much !


Le 10/02/2014 20:45, Andreas Färber a écrit :
> Hi,
> 
> Am 10.02.2014 19:18, schrieb Vincent KHERBACHE:
>> I just created a new QMP command following the
>> 'writing-qmp-commands.txt' howto.
>>
>> It's works well by adding the corresponding function into 'qmp.c', but
>> when I want to insert the function in 'kvm-all.c' (which is my goal) I
>> get an 'undefined reference' error to the function from 'qmp-marchal.c'
>> during the compilation.
> 
> Have you thought of also adding a corresponding function to kvm-stub.c
> for the targets not linking kvm-all.c?
> 
> Regards,
> Andreas
> 

-- 
Vincent KHERBACHE

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

* Re: [Qemu-devel] qmp_* functions into 'kvm-all.c'
  2014-02-10 18:18 [Qemu-devel] qmp_* functions into 'kvm-all.c' Vincent KHERBACHE
  2014-02-10 19:45 ` Andreas Färber
@ 2014-02-10 21:59 ` Paolo Bonzini
  1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-02-10 21:59 UTC (permalink / raw)
  To: Vincent KHERBACHE, qemu-devel

Il 10/02/2014 19:18, Vincent KHERBACHE ha scritto:
>
> I just created a new QMP command following the
> 'writing-qmp-commands.txt' howto.
>
> It's works well by adding the corresponding function into 'qmp.c', but
> when I want to insert the function in 'kvm-all.c' (which is my goal) I
> get an 'undefined reference' error to the function from 'qmp-marchal.c'
> during the compilation.
>
> I already included "qmp-commands.h" in 'kvm-all.c' preprocessor but it
> didn't solve the problem.
>
>
> Does someone know how to fix it (or why it happens) ?
> Thanks.

Maybe you need to add a dummy implementation in kvm-stub.c?  kvm-all.c 
is not compiled into all targets, only on the "native" ones (e.g. i386 
and x86_64 if compiling on x86).

Paolo

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

end of thread, other threads:[~2014-02-10 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 18:18 [Qemu-devel] qmp_* functions into 'kvm-all.c' Vincent KHERBACHE
2014-02-10 19:45 ` Andreas Färber
2014-02-10 21:14   ` Vincent KHERBACHE
2014-02-10 21:59 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).