> -----Original Message-----
> From: Uri Lublin [mailto:[EMAIL PROTECTED]
> Sent: 18 September 2008 14:18
> To: Hacking, Stuart
> Cc: [email protected]
> Subject: Re: Problem adding new source files
>
> Hacking, Stuart wrote:
> > Hello,
> Hi,
> >
> > We have been doing some experimentation with modifications to the
> > migration code in the Qemu and came up against a problem.
> We included
> > some code in a different file and are receiving the following error
> > from
> > make:
> >
> > ---
> > Migration.o: In function `migrate_prepare_page':
> > /root/tmp/KVM/qemu/migration.c:367: undefined reference to
> > `get_cached_page'
> > /root/tmp/KVM/qemu/migration.c:367: undefined reference to
> > `get_cached_page'
> > /root/tmp/KVM/qemu/migration.c:367: undefined reference to
> > `get_cached_page'
> > collect2: ld returned 1 exit status
> > Make[2]: *** [qemu-system_x86_64] Error 1
> > Make[1]: *** [subdir-x86_64-softmmu] Error2
> > Make: *** [qemu] Error 2
> > ---
>
> Did you define new functions in a different .c file(s) ? Did
> you provide prototypes for all new functions ? Did you add
> all new files to the Makefile ?
>
As far as I know all the code is organised properly and the function
prototypes provided in header files. As for adding to the Makefile -
that's where we are struggling. We have tried the following
'experiments': adding our new source files to the 'OBJS' variable
(OBJS+=s1.o s2.o); creating a migration.o directive which depends on
s1.o and s2.o (this actually produces a slightly different error:
---
In File included from s1.h:11,
from s1.c:14:
Qemu-kvm.h:11:17: error: cpu.h: No such file or directory
In File included from s1.h:11,
from s1.c:14:
Qemu-kvm.h:18: error: expected declaration specifiers of '...' before
'CPUState'
<ommitted further cascading errors>
Make[1]: *** [arc.o] Error 1
Make[1]: Leaving directory `/root/tmp/KVM2/qemu'
Make: *** [qemu] Error 2
---
This is why we are wondering if any special consideratinos need to be
made when adding to the makefile, or if there is already a howto
somewhere?
>
> Regards,
> Uri.
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html