Hi Art!

Thank you for your reply.  I didn't make any changes to the CMake files, since 
I'm using OSG (and now osgPPU :-)) in my spare time and I didn't have much of 
it in the last few days...

I've checked out the latest version, it compiles without any problems! There 
are still some config problems, but they could be easily improved, I hope :-) :

1)  You have to add the following value

         -ccbin "$(VCInstallDir)bin" -DWIN32

     to the CUDA_NVCC_FLAGS variable. I'm sure, this string doesn't make
     any sense on Linux, so maybe we can add a new CMake varibale, e.g.
     CUDA_WIN_NVCC_FLAGS, and set the default value to the
     above-mentioned string. It would be then used as additional "nvcc"
     parameter when compiling the "kernel.cu" file on Windows.

2) The auto-generated "cudakernel" project does not contain the
    "Export.h" file. However, this file could be found on the include path
    and used during compiling. That is not a real error :-)

3) The "cudakernel" project does not contain references to the following
    needed libraries:

    "osg.lib", "OpenThreads.lib" and "osgPPU.lib"
    (Debug: "osgd.lib", "OpenThreadsd.lib" and "osgPPUd.lib")

I've changed the "Export.h" file (please, see attachment, line 35) to use the 
already defined "cudakernel_EXPORTS" preprocessor makro.

Regards,
Oleg

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9017#9017



/***************************************************************************
 *   Copyright (c) 2008   Art Tevs                                         *
 *                                                                         *
 *   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 3 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 Lesse General Public License for more details.                    *
 *                                                                         *
 *   The full license is in LICENSE file included with this distribution.  *
 ***************************************************************************/

#ifndef _C_OSGPPU_CUDAKERNEL_EXPORT_H_
#define _C_OSGPPU_CUDAKERNEL_EXPORT_H_

#if defined(_MSC_VER)
 #pragma warning( disable : 4244 )
 #pragma warning( disable : 4251 )
 #pragma warning( disable : 4267 )
 #pragma warning( disable : 4275 )
 #pragma warning( disable : 4290 )
 #pragma warning( disable : 4786 )
 #pragma warning( disable : 4305 )
 #pragma warning( disable : 4996 )

#endif

#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || 
defined( __BCPLUSPLUS__)  || defined( __MWERKS__)
    #  if defined( OSGPPU_CUDAKERNEL_LIBRARY_STATIC )
    #    define OSGPPU_EXPORT
    #  elif defined( cudakernel_EXPORTS )
    #    define OSGPPU_CUDAK_EXPORT   __declspec(dllexport)
    #  else
    #    define OSGPPU_CUDAK_EXPORT   __declspec(dllimport)
    #  endif
#else
    #  define OSGPPU_CUDAK_EXPORT
#endif

// set up define for whether member templates are supported by VisualStudio 
compilers.
#ifdef _MSC_VER
# if (_MSC_VER >= 1300)
#  define __STL_MEMBER_TEMPLATES
# endif
#endif //_MSC_VER

/* Define NULL pointer value */

#ifndef NULL
    #ifdef  __cplusplus
        #define NULL    0
    #else
        #define NULL    ((void *)0)
    #endif
#endif //NULL

#endif //_C_OSGPPU_CUDAKERNEL_EXPORT_H_
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to