So I compiled V8 as a shareable object and then it built and ran just
fine.

I would still like to link this statically though, so any help would
be appreciated.

Thanks,
Jeff

On Oct 8, 9:25 pm, codedread <[EMAIL PROTECTED]> wrote:
> I have a C++ project that I primarily work on in Windows, though the
> code is portable to other platforms.
>
> I recently linked in V8 and started using it extensively.  This works
> perfectly in WIndows (add include path, add library path and v8.lib in
> Visual Studio).
>
> I was trying to write a Makefile for my Ubuntu box.  I am able to get g
> ++ to compile everything, but upon linking I get the following error
> message(s):
>
> src/TnoApp.o: In function `TnoApp::init(int, char**)':
> TnoApp.cpp:(.text+0x43e1): undefined reference to
> `v8::ObjectTemplate::New()'
> TnoApp.cpp:(.text+0x4442): undefined reference to
> `v8::FunctionTemplate::New(v8::Handle<v8::Value> (*)(v8::Arguments
> const&), v8::Handle<v8::Value>, v8::Handle<v8::Signature>)'
> TnoApp.cpp:(.text+0x4487): undefined reference to
> `v8::String::New(char const*, int)'
> TnoApp.cpp:(.text+0x44cc): undefined reference to
> `v8::Template::Set(v8::Handle<v8::String>, v8::Handle<v8::Data>,
> v8::PropertyAttribute)'
> TnoApp.cpp:(.text+0x4512): undefined reference to
> `v8::FunctionTemplate::New(v8::Handle<v8::Value> (*)(v8::Arguments
> const&), v8::Handle<v8::Value>, v8::Handle<v8::Signature>)'
> ...
>
> Basically it seems that g++ is just not able to find the library (it
> compiled just fine).
>
> * I was able to build v8 just fine on my system using scons
> * the 2.6MB libv8.a file has been copied to /usr/local/lib/
> * my Makefile includes LDFLAGS=-L/usr/local/lib/ -lv8 ....
>
> Other things (like SDL, expat, boost) seem to be linking just fine.
> Does anybody have any pointers?
>
> I've tried g++ 3.3, 3.4, 4.1 and 4.2 to no avail.
>
> Thanks,
> Jeff Schiller
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to