Hi, I wanted to see how easily OpenOBEX compiles on Visual Studio 2005. Overall it wasn't too bad, but required a bit of effort. Attached is a patch to make it compile. I've tested successfully with TCP transport.
Some notes: Library: - Visual C++ compilers don't and probably never will support C99 semantics. Thus C99 struct initialization & variable declaration must be done the old way. - Win32 understands send and recv for sockets, not read and write - Win32 doesn't have stdint.h, had to fake it, see attached obex_stdint.h - Win32 doesn't have inet_ntop, had to fake it - Fixed a bug where obex client resets its mode to server before delivering an event (this broke obex_test) - Win32 doesn't support symlinks, had to manually copy headers to include/openobex. This needs a better solution. Can we move includes to include/openobex in the source tree? Applications: - Made a very basic effort to compile obex_test app. Seems to work. -Denis ----------------------------------------- Trolltech ASA, Sandakerveien 116, PO Box 4332, Nydalen NO-0402 Oslo, Norway
openobex-on-msvs2005.patch
Description: Binary data
openobex-apps-on-msvs2005.patch
Description: Binary data
openobex.vcproj
Description: application/xml
/* * * OpenOBEX - Free implementation of the Object Exchange protocol * * Copyright (C) 2002-2006 Denis Kenzior <[EMAIL PROTECTED]> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef __OBEX_STDINT_H #define __OBEX_STDINT_H #ifndef _WIN32 #include <stdint.h> #else typedef __int8 int8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #endif #endif /* __OBEX_H */
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Openobex-users mailing list [email protected] http://lists.sourceforge.net/lists/listinfo/openobex-users
