Errors when starting new project

This topic contains 4 replies, has 2 voices, and was last updated by  john lam 4 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31192

    john lam
    Member

    Hi all,

    I have included all files necessary including all the EGL, GLES2, and GLES headers etc… however at the moment I am getting an error and one warning

    Error 2 error C2731: ‘WinMain’ : function cannot be overloaded c:usersxdocumentsvisual studio 2010projectsogles2_pvrogles2_pvrpvrshellos.cpp 764 1 OGLES2_PVR

    and

    Error 3 error C2065: ‘PVRSDK_VERSION’ : undeclared identifier c:usersxdocumentsvisual studio 2010projectsogles2_pvrogles2_pvrpvrshell.cpp 539 1 OGLES2_PVR

    Warning 1 warning C4996: ‘_vsnprintf’: This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:usersxdocumentsvisual studio 2010projectsogles2_pvrogles2_pvrpvrshellos.cpp 79 1 OGLES2_PVR

    #36892

    Scott
    Moderator

    Hi,

    I believe the WinMain error is due to your project’s “Character Set” being set to “Use Unicode Character Set”. If you set this to “Use Multi-Byte Character Set” under the General Configuration Properties the error should go away.

    As for the second error, PVRSDK_VERSION is defined in sdkver.h. However, I’m assuming this header can be found otherwise you’d get a different error. Also, if sdkver.h wasn’t defining it then PVRShell.cpp defines it. Has PVRShell.cpp been modified to not include sdkver.h or define PVRSDK_VERSION?

    Thanks,

    Scott

    #36893

    john lam
    Member

    Hi Scott,

    I have solved the PVRSDK_VERSION problem and carried out as you instructed with the WinMain error. This got rid of the error but then came back with many linker errors. I have already went into VS configuration properties and included the directories needed. Here is one of the errors

    Error 1 error LNK2019: unresolved external symbol “class PVRShell * __cdecl NewDemo(void)” (?NewDemo@@YAPAVPVRShell@@XZ) referenced in function “public: bool __thiscall PVRShellInit::Init(void)” (?Init@PVRShellInit@@QAE_NXZ) C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERPVRShell.obj OGLES2_PVR_WATER

    Most of the errors are occuring within the PVRShellAPI.Obj

    #36894

    Scott
    Moderator

    Error 1 error LNK2019: unresolved external symbol “class PVRShell * __cdecl NewDemo(void)” (?NewDemo@@YAPAVPVRShell@@XZ) referenced in function “public: bool __thiscall PVRShellInit::Init(void)” (?Init@PVRShellInit@@QAE_NXZ) C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERPVRShell.obj OGLES2_PVR_WATER

    You need to implement the NewDemo function. This function should return a pointer to the class that inherits from PVRShell. If you take a look at our examples it looks something like

    PVRShell* NewDemo()
    {
    return new OGLES2FilmTV();
    }

    Most of the errors are occuring within the PVRShellAPI.Obj

    If PVRShellAPI.obj is outputting most of the linking errors I’d guess you aren’t linking against libEGL, without seeing the errors I can’t be sure though.

    #36895

    john lam
    Member

    Is it possible if you can give me a run down on how to link the libEGL , as I believe this is the problem

    Here are some of the errors I am encountering:

    Error 21 error LNK2019: unresolved external symbol __imp__eglWaitGL@0 referenced in function “public: void __thiscall PVRShellInit::ApiRenderComplete(void)” (?ApiRenderComplete@PVRShellInit@@QAEXXZ) C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERPVRShellAPI.obj OGLES2_PVR_WATER

    Error 20 error LNK2019: unresolved external symbol __imp__glGetError@0 referenced in function “public: bool __thiscall PVRShellInit::ApiScreenCaptureBuffer(int,int,unsigned char *)” (?ApiScreenCaptureBuffer@PVRShellInit@@QAE_NHHPAE@Z) C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERPVRShellAPI.obj OGLES2_PVR_WATER

    Error 14 error LNK2019: unresolved external symbol __imp__glGetString@4 referenced in function “public: void __thiscall PVRShellInit::OutputAPIInfo(void)” (?OutputAPIInfo@PVRShellInit@@QAEXXZ) C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERPVRShellAPI.obj OGLES2_PVR_WATER

    Error 19 error LNK2019: unresolved external symbol __imp__glReadPixels@28 referenced in function “public: bool __thiscall PVRShellInit::ApiScreenCaptureBuffer(int,int,unsigned char *)” (?ApiScreenCaptureBuffer@PVRShellInit@@QAE_NHHPAE@Z) C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERPVRShellAPI.obj OGLES2_PVR_WATER

    Error 22 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup C:UsersjohnDocumentsVisual Studio 2010ProjectsOGLES2_PVR_WATEROGLES2_PVR_WATERMSVCRTD.lib(crtexe.obj) OGLES2_PVR_WATER

    Thanks,
    John

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.