Google VR sdk won't compile - google-cardboard

When I add the sdk to my project and try to compile, I get these errors:
Assets/GoogleVR/Scripts/GvrViewer.cs(84,18): error CS0246: The type or
namespace name StereoController' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(171,11): error CS0246: The type
or namespace nameGvrProfile' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(188,11): error CS0246: The type
or namespace name GvrProfile' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(192,18): error CS0246: The type
or namespace nameBaseVRDevice' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(69,17): error CS0246: The type or
namespace name StereoController' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(157,10): error CS0246: The type
or namespace nameGvrProfile' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(174,10): error CS0246: The type
or namespace name GvrProfile' could not be found. Are you missing a
using directive or an assembly reference?
Assets/GoogleVR/Scripts/GvrViewer.cs(253,10): error CS0246: The type
or namespace nameGvrProfile' could not be found.
Are you missing a using directive or an assembly reference?
Am I missing something?

From 1.0 on, the GVR Unity SDK is targeted at the native integration (now in technical preview). If you are using a version w/ out technical preview, then you need some extra scripts, which are in the "backwards compat" package.

Related

Build Acumatica project getting error: The type or namespace name 'PX' could not be found

I'm learning Acumatica ERP follow course T100_AcumaticaFrameworkIntro_5_0. I can add new class in project and using PX object. But when i build my project i geting error :
Error 1 The type or namespace name 'PX' could not be found (are you missing a using directive or an assembly reference?)
Error 2 The type or namespace name 'PXGraph' could not be found (are you missing a using directive or an assembly reference?)
Error capture
Please help me.
You need to add a reference to the PX.Data, PX.Common, & PX.objects files (located in your ERP's bin folder) to your custom project.

Missing Reference or Directive for Only Caliburn.Micro Xamarin Example

I am attempting to compile the HubBrowser project - which is an example Caliburn Micro Xamarin project (one of the very few there are).
Its a great example but the Android project is not compiling. I get the following errors:
Error 8 The type or namespace name 'CaliburnApplication' could not be found (are you missing a using directive or an assembly reference?) HubBrowser\HubBrowser.Android\Application.cs 14 32 HubBrowser.Android
Error 7 The type or namespace name 'ActivityLifecycleCallbackHandler' could not be found (are you missing a using directive or an assembly reference?) HubBrowser\HubBrowser.Android\Services\ApplicationNavigationService.cs 12 26 HubBrowser.Android
Error 9 The type or namespace name 'ActivityEventArgs' could not be found (are you missing a using directive or an assembly reference?) HubBrowser\HubBrowser.Android\Services\ApplicationNavigationService.cs 24 55 HubBrowser.Android
Error 10 The type or namespace name 'ActivityEventArgs' could not be found (are you missing a using directive or an assembly reference?) HubBrowser\HubBrowser.Android\Services\ApplicationNavigationService.cs 29 54 HubBrowser.Android
What is the cause of this error and how can I fix it?
I have made sure my references point to Caliburn.Micro and Caliburn.Micro.Platform (net45 versions). Do I need Caliburn.Micro.Portable.Core? If so where is this dll? Installing C.M through NuGet always fails - these NuGet packages and PCL's are and ABSOLUTE nightmare.
You need to use the pre-release 3.0 beta package. In the Core PCL project, install Caliburn.Micro.Core 3.0.0-beta1, and in your Android project, install Caliburn.Micro 3.0.0-beta1 (which will also install Core as a dependency).
Be sure to check the "pre-release" checkbox in the Nuget dialog or else you won't see the beta releases.

Issue in convert project from vc6 to vc9

I have a project that was build in vc6,Now I have to convert it into vc9.
In the code there is line
CMapStringToOb cLogPathMap;
ofstream tlogFile;
But when I build the project the following error occur.
error C2146: syntax error : missing ';' before identifier 'tlogFile'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
When I go to definition of ofstream the file iosfwd is opened where ofstream defined as
typedef basic_ofstream<char, char_traits<char> > ofstream;
The following microsoft suggests to include fstream:
http://msdn.microsoft.com/en-us/library/e9cabcax%28v=vs.90%29.aspx
So put the following line in your header includes for that c++ file:
#include <fstream>

Library linker errors driving me mad

It's me again. I'm back with an all new project and an all new problem.
I am trying to implement something for Growl. Either using a static or shared library (both are provided). I included the necessary header and linked to the library. (2 ways actually, once through the project properties and the other through a pragma statement). However, im still receiving the following linker errors:
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Growl::Growl(enum Growl_Protocol,char const * const,char const * const,char const * * const,int)" (__imp_??0Growl##QAE#W4Growl_Protocol##QBD1QAPBDH#Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Growl::~Growl(void)" (__imp_??1Growl##QAE#XZ)
fatal error LNK1120: 2 unresolved externals
The line of code that is causing these linker errors is this line:
const char *n[2] = { "username" , "password" };
Growl *growl = new Growl(GROWL_TCP,NULL, "Appname", (const char **const)n,2);
The header file is being included at the top of the file and I am linking with the following line:
#include "..\\..\\..\\libs\\Growl\\growl++.hpp"
#pragma comment(lib, "..\\..\\..\\libs\\Growl\\libgrowl-static++.lib")
The header source can be found here:
https://github.com/psinnott/gntp-send/blob/master/headers/growl%2B%2B.hpp
I retrieved the pre-built binaries from the following page:
https://github.com/psinnott/gntp-send/wiki/Windows
Some extra info: I do have my Project Propeties character set to use Multi-Byte Character Set, im under the assumption this shouldn't affect anything. This is also a Win32 Console application.
Where am I going wrong?
Update:
Found this via google:
http://groups.google.com/group/growl-for-windows/browse_thread/thread/6c48a62454d062f1
Followed the instructions:
Added the libgrowlstatic.lib (alongside libgrowlstatic++.lib)
Added the pre-processor definitions, GROWL_STATIC and GROWL_CPP_STATIC
Got lots of error including:
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
fatal error LNK1169: one or more multiply defined symbols found
So I added the following line to Project properties, Linker, Command Line:
/NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:LIBCMT
Now im getting alot more errors including some of the following:
libgrowl-static.lib(tcp.obj) : error LNK2019: unresolved external symbol _atoi referenced in function _growl_tcp_parse_hostname
libgrowl-static.lib(tcp.obj) : error LNK2019: unresolved external symbol _strchr referenced in function _growl_tcp_parse_hostname
libgrowl-static.lib(growl-static.obj) : error LNK2019: unresolved external symbol _fseek referenced in function _growl_tcp_register
libgrowl-static.lib(growl-static.obj) : error LNK2019: unresolved external symbol _fopen referenced in function _growl_tcp_register
libgrowl-static.lib(growl-static.obj) : error LNK2019: unresolved external symbol _strcpy referenced in function _growl_udp_notify
Been at this for several hours and can't seem to figure it out. 10+ views and no replies?
I swear im not being lazy. I looked into one of the answers provided about libraries but didn't have much luck. Nothing explained why this is acting the way it is. Please help!
#pragma comment(lib, "..\\..\\..\\libs\\Growl\\libgrowl-static++.lib")
There is a clear mismatch between the #pragma and the way your code is getting compiled. The name of the library strongly suggests this is a static link library, the "static" in the name makes that clear. The error messages however talk about __declspec(dllimport), a directive that's used when you compile code that #includes a header that assumes the code lives in a DLL instead of a static link library.
The other errors you are getting bear this out as well. The Project + Properties, C/C++, Code Generation, Runtime Library setting matters. You are using the /MD setting, a setting that's appropriate when you work with DLLs. The library no doubt was compiled with /MT, a setting appropriate when you create a monolithic EXE that doesn't use DLLs. You are trying to link two chunks of code that were built with conflicting settings, the linker falls over when trying to deal with this. It explicitly says so in an error message.
You'll need to either dig up the DLL version of the .lib or use /MT consistently in the rest of your code. There's usually a #define that tells the .h file which version of the .lib you intend to link.
This is working for me. It assumes you want to use the static libraries and not the dll.
Properties -> Configuration -> Properties -> VC++ Directories
Add directory of unzipped sdk to include and library directories
Properties -> Configuration -> Properties -> C/C++ -> Preprocessor
Add GROWL_STATIC and GROWL_CPP_STATIC to preprocessor definitions
Properties -> Configuration -> Properties -> C/C++ -> Code generation
Change runtime library to multi threaded ( /MT or /MTd )
Properties -> Configuration -> Properties -> Linker -> Input
Add ws2_32.lib , libgrowl-static.lib and libgrowl-static++.lib to additional dependencies

WDK (Windows Driver Kit) and VC++ headers problem

I'm trying to read from an USB HID device, I know how to do it in C# using DLLImport hid.dll, but I want to do it from C++, this way I don't have to declare all the structures, etc, and just include the headers files.
So I downloaded the WDK and then when including the headers files and linking the libraries I'm getting a lot of errors:
#include <windows.h>
extern "C" {
#include <hidsdi.h>
}
int main(){
}
Errors (6 out of 163):
Error 1 error C2065: 'PASSIVE_LEVEL' : undeclared identifier c:\winddk\7600.16385.1\inc\api\hidpi.h 302 driver
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.1\inc\api\hidpi.h 303 driver
Error 3 error C2146: syntax error : missing ';' before identifier 'NTSTATUS' c:\winddk\7600.16385.1\inc\api\hidpi.h 303 driver
Error 4 error C2143: syntax error : missing ';' before '__stdcall' c:\winddk\7600.16385.1\inc\api\hidpi.h 303 driver
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.1\inc\api\hidpi.h 303 driver
Error 6 error C2377: 'NTSTATUS' : redefinition; typedef cannot be overloaded with any other symbol c:\winddk\7600.16385.1\inc\api\hidpi.h 303 driver
OK so I read somewhere that I have to upgrade the Windows SDK too, I had the Microsoft Windows SDK v6.0A, I downloaded and installed the windows SDK v7.0. But then looks like I have two SDK now? How I properly do the SDK upgrade in visual studio?
I very much appreciate your help,
Thanks,
Carlos
I found a solution, don't know why this is working, but it is!:
In Visual Studio go to:
Tools->Options->Projects->VC++ Directories and then Show directories for: include files.
Add this folders:
C:\WinDDK\7600.16385.1\inc\ddk and C:\WinDDK\7600.16385.1\inc\api
Now here is the trick that solved the problem for me and I don't know why, because seems odd but here it is:
C:\WinDDK\7600.16385.1\inc\ddk -> This directory have to be the first directory in the list!
C:\WinDDK\7600.16385.1\inc\api -> This directory have to be ABOVE "$(WindowsSdkDir)\include" BUT BELOW "$(VCInstallDir)include"
Example:
C:\WinDDK\7600.16385.1\inc\ddk
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
C:\WinDDK\7600.16385.1\inc\api
$(WindowsSdkDir)\include
$(FrameworkSDKDir)include
Carlos

Resources