Hi John,

The '\n' character doesn't occur in the argv from a standard console
(release or debug), but only when I run the code from Visual Studio
2010. When I run from VS2010 there are problems both with release and
debug version. (so that plugin dll will not load)

I've been following this thread by curiosity. I develop OSG-based apps with Visual Studio all the time, but I use VS 2005 and 2008 (haven't used VS 2010 yet). And I can say I have never had a problem like this.

If any newline character is in the command line args, it's almost surely an error. If VS is doing this it's a bug in VS. However if it's a bug they aren't likely to fix soon, then it would probably make sense to put in some code to remove them in order to improve the new user experience (as new users are likely to use the latest compiler available and want to run examples from inside Visual Studio right after compiling OSG).

It might be interesting to see if you can reproduce this in a simple non-OSG app, something like:

#include <iostream>

int main(int argc, char* argv[])
{
  for (unsigned int i = 0; i < argc; ++i)
  {
    std::string arg(argv[i]);
    if (arg.find_first_of("\n\r") != std::string::npos)
    {
      std::cout << "There was a newline in arg " << i << std::endl;
    }
  }

  return 0;
}

and run this from Visual Studio. If there are newlines, then you can surely log a bug report with Microsoft, or at least search the web or their message boards to see if someone else has reported this before. If it's a bug in VS then we surely won't be the only ones to have found out about it...

Let us know what you find out,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to