On Dec 16, 2007, at 13:28, Stefan Lundmark wrote:
> Hello everyone,
> We've been using libtorrent as a static lib and it has been working
> great so far. We've come to a point where we need to expose
> functions in our game engine, to libtorrent (for example, the
> filesystem which can read/write into our data file, which contains
> all files and assets for the game).
You might be interested in the storage_interface customization point
in the upcoming 0.13 release .
> I tried simply putting the src/include files into our project, and
> it compiles - but unfortunatly does not link. We replicated the
> same project settings as from the static lib, we read the
> documentation, set the correct preprocessor defines and I'm now
> ready to give it up because we can't get it to work.
> Error messages from the linker are mostly (60 out of 72) "Class/
> Function already defined in..". The rest are unresolved externals.
> I'm confident we can fix the latter, but the former is causing us
> some great pain.
Maybe you could post a few of those error messages?
Are they in the libtorrent or boost namespace?
There is a known problem in boost.filesystem in boost-1.34, where
there's a missing "inline" .
> We tried using Multithread DLL instead of Multithread, but it
> didn't seem to make any difference. I can't get my head around it.
> Libtorrent is full of include guards, and I can't understand why
> something can be included twice with those in place. Pragma once
> didn't help either.
> Is what we're trying to accomplish, even possible?
How did you build it before you put it in your project? boost-build?
If that is the case, one thing you can try is to run bjam -n, that
will print all the command line options that are passed to the compiler.
> Am I missing something obvious? Thanks a ton to anyone who can give
> any tips.