OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Visual Studio compilation error


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU]
View previous topic :: View next topic  
Author Message
creature (Ethan Fahy)
Appreciator


Joined: 07 Sep 2011
Posts: 142

PostPosted: Mon Jan 07, 2013 7:26 pm    Post subject:
Visual Studio compilation error
Reply with quote

Hello all,

I am attempting to build the trunk version of osgPPU against the trunk version of osg and cuda 5.0 using Visual Studio 2010 SP1 on Windows 7 x64. I am trying to build in 32-bit mode and so I'm pointing to the 32-bit versions of the CUDA libraries that come with CUDA 5.0. I also built osg in 32-bit mode. I am also using CMake 2.8.9 .

Before getting to the compilation errors, is there a known incompatibility between anything I just described?

CMake was having a hard time finding CUDA-related values automatically so I mostly set them manually as follows:

CUDA_DIR : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0

CUDA_INCLUDE : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/include

CUDA_NVCC : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/bin/nvcc.exe

CUDA_NVCC_FLAGS : -ccbin "$(VCInstallDir)bin";-DWIN32

CUDA_SDK_DIR : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0

FOUND_CUDA : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/lib/Win32/cuda.lib

FOUND_CUDART : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/lib/Win32/cudart.lib

FOUND_CUDA_NVCC_INCLUDE : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/include

Does any of this seem incorrect?

Lastly, when I go to build this project in Visual Studio it builds everything successfully except for the cudakernel project which has more than 100 errors. I'll post some of them here (there are many more of the C2719 errors but I think you'll get the point):

Error 2 error C2371: 'size_t' : redefinition; different basic types c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h 27
Error 3 error C4235: nonstandard extension used : '__unaligned' keyword not supported on this architecture c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h 342
Error 4 error C2719: 'val': formal parameter with __declspec(align('8')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2642
Error 5 error C2719: 'val': formal parameter with __declspec(align('8')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2647
Error 6 error C2719: 'val': formal parameter with __declspec(align('8')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2672
Error 7 error C2719: 'val': formal parameter with __declspec(align('8')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2677
Error 8 error C2719: 'val': formal parameter with __declspec(align('16')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2682
Error 9 error C2719: 'val': formal parameter with __declspec(align('16')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2687
Error 10 error C2719: 'val': formal parameter with __declspec(align('16')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2712
Error 11 error C2719: 'val': formal parameter with __declspec(align('16')) won't be aligned c:\program files\nvidia gpu computing toolkit\cuda\v5.0\include\surface_functions.h 2717
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Warning: Error in reading to jpg images romulogcerqueira General 4 Sat Nov 04, 2017 10:37 pm View latest post
No new posts osganimation branch builds fine (32 b... reedev Submission 3 Sun Oct 29, 2017 9:48 am View latest post
No new posts Compile error with Visual Studio 2017 draccagni General 2 Sat Aug 19, 2017 1:52 pm View latest post
No new posts PHPBB ERROR: A Closer Look, and Why Steal General 0 Mon Jul 10, 2017 11:03 am View latest post
No new posts PBuffer causing error when profiling ... jsmitq General 1 Thu Jun 08, 2017 4:24 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP