[Nestedvm] How's NestedVM doing in my absence?

Brian Alliet brian at brianweb.net
Wed Oct 20 12:01:31 EDT 2010


On Wed, Oct 20, 2010 at 05:09:40PM +0400, Dmitry Mukhin wrote:
> I am trying to convert c++ project to Java class using NestedVM.
> Right now I am unable to link c++ test program using sockets (undefined 
> reference to `socket(int, int, int)'). C program links fine.
> Can you give me some advice on this?

I suspect NestedVM's socket headers (I hand rolled these, they aren't
from newlib) are missing 'extern "C"' wrappers. I'd either edit
upstream/install/mips-unknown-elf/includes/nestedvm/socket.h to have
this wrapper:

#ifdef __cplusplus
extern "C" {
#endif

... contents of header here ...

#ifdef __cplusplus
}
#endif

or just wrap put this in your project:

extern "C" {
#	include <nestedvm/socket.h>
}

(you don't actually need sys/socket.h, netinet/in.h, arpa/inet.h, etc,
they all just include nestedvm/socket.h)

I should fix this upstream.... but I'm not quite sure where upstream
is nowadays. 

-Brian



More information about the Nestedvm mailing list