Thank you all for your help. I tried running the C++ clients in release mode but they still crashed unfortunately.
Setting HAVE_STDINT_H to false in CMake has gotten rid of the "C2371: 'int64_t' : redefinition; different basic types" errors.

It would be much appreciated if you could send your compilations issues document Jorge as there are two errors left and I guess you've figured out how to solve them.

Error 1605 error C1083: Cannot open include file: 'netinet/in.h': No such file or directory C:\...\Player\player\server\drivers\fiducial\laserfeature.cc 124 1 playerdrivers
Error 1753 error C1083: Cannot open include file: 'sys/time.h': No such file or directory C:\...\Player\player\server\drivers\position\differential\chronos.cc 26 1 playerdrivers

I'll give the nanosleep and usleep thing a go and reply with the results.

Perhaps this is for another thread, but I noticed that you guys are using swig - I was wondering if I would be able to use swig to create C# bindings for Player?

Thanks again for your help



I have successfully compiled player on windows with CMake 2.8 and
Visual Studio 2010:
when reviewing the notes about tweaks I made during the compilation, I
have seen that flag
HAVE_STDINT_H must be set as false on cmake. I suppose this should fix
the problem.
Let me know if not. I can send you the hole compilation issues document.

Concerning the crashing error, I have never tried the C++ client (I
use javaclient), but one
thing I have remarked is that the nanosleep and usleep functions
provoke crashes on
windows. Can you try to replace usleep by Sleep in the test program?
(note that the Sleepīs
argument is now in milliseconds)

Good luck!

> Regarding the <stdint.h> compatibility issue - from the Boost.Integer
> library:
> "The header <boost/cstdint.hpp><http://www.boost.org/doc/libs/1_45_0/boost/cstdint.hpp>provides
> the typedef's useful for writing portable code that requires
> certain integer widths."
> I am not sure if this not would be an overkill, since probably some of
> SWIG-based bindings relies on the interface to stdint.i...

On Fri, Jan 14, 2011 at 15:37, Rich Mattes <jpgr87@gmail.com> wrote:

> > -----Original Message-----
> > From: James Diprose [mailto:jamie.diprose@gmail.com]
> > Sent: Thursday, January 13, 2011 9:32 PM
> > To: playerstage-users@lists.sourceforge.net
> > Subject: [Playerstage-users] Player Client on Windows 7 with Visual
> > Studio 2010
> >
> > Hi
> >
> > I'm using the Player 3.0.2, in Visual Studio 2010 with the Windows
> > binaries. I've created a simple player client and manually added the
> > directory for the player headers and the library files to the visual
> > studio project. It compiles fine, but when I run it I get the following
> > error when initializing the player client: "PlayerClient
> > client("", 6665);":
> >
> > "A buffer overrun has occurred in PlayerTest.exe which has corrupted
> > the program's internal state. Press Break to debug the program or
> > Continue to terminate the program.
> >
> > For more details please see Help topic 'How to debug Buffer Overrun
> > Issues'."
> >
> > And in the console it says: "playerc error    : connect call on
> > [] failed with error [0:The operation completed
> > successfully.]"
> >
> > or "Unhandled exception at 0x721592e3 in PlayerTest.exe: 0xC0000005:
> > Access violation reading location 0x00000024." if I declare a variable
> > before PlayerClient client("", 6665); (weird I know :S).
> >
> > The weird thing is that error message says that the player client is
> > trying to connect with a different port number than I specified e.g.
> > 18292145 rather than 6665?
> >
> > I've tried to manually compile player using CMake 2.8 as well, I got as
> > far as generating a Visual Studio 2010 project but it will not compile
> > because stdint.h and types.h both define int64_t and uint64_t. I.e. the
> > error "C2371: 'int64_t' : redefinition; different basic types". I tried
> > using #ifndef etc as mentioned somewhere else on the mailing list but
> > it didn't help.
> >
> > Has anybody else created player clients on Windows successfully / have
> > any ideas what could be going wrong?
> >
> > Thanks for your help
> >
> > Jamie
> For the crashing error, I think I ran into something similar with VS2008.
> It turns out that Player was built in "release" mode, and any client
> programs I tried would end up crashing unless they were built in "release"
> mode too.  Could you try running your client in "release" mode?
> As for the stdint errors, it looks like Microsoft finally decided to ship
> stdint.h with Visual Studio 2010.  Player has been using workarounds for a
> while, so we'll have to re-examine the logic for getting stdint.h
> functionality into the various parts of Player.
> Rich
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Playerstage-users mailing list
> Playerstage-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/playerstage-users