Forums
compile with visual studio - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: compile with visual studio (/showthread.php?tid=1597)



compile with visual studio - ghiboz - 02-02-2012

hi all!
i'm trying to compile vdrift with visual studio....
a strange error appears here:

the error is here:
Code:
    template <typename T> void _get(const PTree & p, T & value) const
    {
        std::stringstream s(p._value);
        s >> value;
    }
especially in the s >> value; when (seems looking the error) when I try to get a btVector3..

the error is this:

Quote:Error 1 error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'std:Confusedtringstream' (or there is no acceptable conversion) cfg\ptree.h 230

thanks in advance for all!


- NaN - 02-02-2012

Can you try the latest revision(with full recompile)?


- ghiboz - 02-03-2012

i've used the latest github code..
I can't find the _get specalization to read btVector3


- NaN - 02-03-2012

You are looking for std::istream & operator >> (std::istream & lhs, btVector3 & rhs). It is defined where required(should be factored out int a separate file).

I can compile the code with vs2010, gcc and clang without errors. Which visual studio version are you using?


- ghiboz - 02-03-2012

NaN Wrote:You are looking for std::istream & operator >> (std::istream & lhs, btVector3 & rhs). It is defined where required(should be factored out int a separate file).

I can compile the code with vs2010, gcc and clang without errors. Which visual studio version are you using?

I have vs2010, but i can't find the definition (in each separate file?)
thanksSmile


- NaN - 02-03-2012

You should be able to compile without errors.

pull from git
eventually run vdrift-win/premake4 vs2010
rebuild vdrift

To find the function definition: CTRL-F search in files, enter function name.


- ghiboz - 02-03-2012

found it!
thanks very much!! :wink: