I have a C++ code from the Sapera LT SDK user manual that acquires images from a Nano camera and displays them live. The problem arises when I attempt to build a project in Visual Studio 2022, as I encounter numerous errors.

I have provided below the steps outlined in the manual to build the project. (I have followed these steps meticulously, but I am still encountering issues during the build process.)

Sapera LT ++ - Creating an Application The following sections describe how to create a Sapera LT ++ application in Visual C++ 2013/2015/2017/2019.

Visual Studio 2013/2015/2017/2019 Follow the steps below to compile and link an application that uses the Basic Classes:

• Include SapClassBasic.h in the program source code (it includes all other required headers) • Add $(SAPERADIR)\Classes\Basic and $(SAPERADIR)\Include in Project | Properties | C/C++ | General | Additional Include Directories • If you are building a 32-bit application, insert $(SAPERADIR)\Lib\Win32\SapClassBasic.lib in Project | Add Existing Item … • If you are building a 64-bit application, insert $(SAPERADIR)\Lib\Win64\SapClassBasic.lib in Project | Add Existing Item … • In Project | Properties | C/C++ | Code Generation | Runtime Library, choose the option Multi- threaded DLL (in release mode) or Multi-threaded Debug DLL (in debug mode)

Follow the additional steps below to compile and link an application that uses the GUI Classes:

• Include SapClassGui.h in the program source code (it includes all other required headers) • Add $(SAPERADIR)\Classes\Gui in Project | Properties | C/C++ | General | Additional Include Directories • If you are building a 32-bit application, insert $(SAPERADIR)\Lib\Win32\VS2013\SapClassGui.lib (or VS2015/VS2017/2019) and SapClassGuiD.lib in Project | Add Existing Item … • If you are building a 64-bit application, insert $(SAPERADIR)\Lib\Win64\VS2013\SapClassGui.lib (or VS2015/VS2017/2019) and SapClassGuiD.lib in Project | Add Existing Item … • In Project | Properties | General, select Not Set for Character Set • In Project | Properties | General for SapClassGui.lib, select Excluded From Build for Debug • In Project | Properties | General for SapClassGuiD.lib, select Excluded From Build for Release


Here is the code that I am using.

```
#include "SapClassGui.h"
#include "conio.h"
#include "SapClassBasic.h"

// Transfer callback function is called each time a complete frame is transferred

void XferCallback(SapXferCallbackInfo* pInfo)
{

// Display the last transferred frame
SapView* pView = (SapView*)pInfo->GetContext();
pView->Show();

}


// Example program
int main()
{

// Allocate acquisition object 
SapAcqDevice* pAcq = new SapAcqDevice("Genie_M640_1", FALSE); 
// uses camera default   settings
//new SapAcqDevice("Genie_M640", "MyCamera.ccf");//loads configuration file

// Allocate buffer object, taking settings directly from the acquisition 
SapBuffer* pBuffer = new SapBuffer(1, pAcq);

// Allocate view object to display in an internally created window 
SapView* pView = new SapView(pBuffer, (HWND)-1);

// Allocate transfer object to link acquisition and buffer 
SapAcqDeviceToBuf* pTransfer = new SapAcqDeviceToBuf(pAcq,pBuffer, XferCallback, pView);

// Create resources for all objects 
BOOL success = pAcq->Create();
success = pBuffer->Create();
success = pView->Create();
success = pTransfer->Create();

// Start a continuous transfer (live grab) 
success = pTransfer->Grab();
printf("Press any key to stop grab\n");
getch();

// Stop the transfer and wait (timeout = 5 seconds) 
success = pTransfer->Freeze();
success = pTransfer->Wait(5000);
printf("Press any key to terminate\n");
getch();

// Release resources for all objects 
success = pTransfer->Destroy();
success = pView->Destroy();
success = pBuffer->Destroy();
success = pAcq->Destroy();

// Free all objects 
delete pTransfer;
delete pView;
delete pBuffer;
delete pAcq;
return 0;
}

```

However, I am still encountering errors when attempting to build the project. I have experimented with different types of Visual Studio projects, such as empty project, console app, and Windows app, but each attempt results in errors.

 Build started at 15:59...
 1>------ Build started: Project: Project1, Configuration: Debug 
 x64 ------
 1>Source.cpp
 1>C:\Program Files\Teledyne 
 DALSA\Sapera\Classes\Gui\SapClassGui.h(36,1): error C1189: 
 #error:  The 
 project option "General | Microsoft Foundation
 Classes" must be "Use MFC in a shared DLL"
 1>(compiling source file 'Source.cpp')
 1>Done building project "Project1.vcxproj" -- FAILED.
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 
 skipped ==========

After that, I changed the option from 'Standard Windows Library' to 'Use MFC in a Shared DLL' in the properties,and built the project again. Then, I encountered the following problems:

Error C2504 'CRectTracker': base class undefined Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 16
Error C2061 syntax error: identifier 'CRect' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 21
Error C3646 'm_LimitRect': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 24
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 24
Error C2061 syntax error: identifier 'CWnd' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 35
Error C2061 syntax error: identifier 'CWnd' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 36
Error C2535 'CImageWnd::CImageWnd(SapView )': member function already defined or declared Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 36
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 40
Error C3646 'TranslateMousePos': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 41
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 41
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 41
Error C3646 'TranslatePos': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 42
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 42
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 42
Error C3646 'UntranslatePos': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 43
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 43
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 43
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 54
Error C3646 'GetPixelString': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 58
Error C2065 'pBuffer': undeclared identifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 58
Error C2275 'SapBuffer': expected an expression instead of a type Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 58
Error C2065 'CPoint': undeclared identifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 58
Error C2146 syntax error: missing ')' before identifier 'point' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 58
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 58
Error C3646 'GetPixelString': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 59
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 59
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 59
Error C3646 'GetSelectedRoi': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 64
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 64
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 64
Error C2061 syntax error: identifier 'CRect' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 65
Error C3646 'ValidateRoi': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 77
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 77
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 77
Error C2143 syntax error: missing ';' before '
' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 82
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 82
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 82
Error C2143 syntax error: missing ';' before '' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 83
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 83
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 83
Error C2143 syntax error: missing ';' before '
' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 84
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 84
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 84
Error C2143 syntax error: missing ';' before '*' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 85
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 85
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 85
Error C3646 'm_ViewRect': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 88
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 88
Error C3646 'm_roi': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 90
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 90
Error C2039 'm_nStyle': is not a member of 'CSapRectTracker' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageWnd.h 61
Error C3646 'm_rcInView': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 69
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 69
Error C3646 'm_rcAnchors': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 70
Error C2143 syntax error: missing ',' before '[' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 70
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 70
Error C3646 'm_penROI': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 72
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 72
Error C3646 'm_brushROI': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 73
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 73
Error C3646 'm_penAnchor': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 74
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 74
Error C3646 'm_brushAnchor': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 75
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 75
Error C2504 'CStatic': base class undefined Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 82
Error C2144 syntax error: 'CImageExWnd' should be preceded by ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 86
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 86
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 116
Error C2061 syntax error: identifier 'CRect' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 117
Error C2535 'void CImageViewportWnd::SetROI(void)': member function already defined or declared Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 117
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 125
Error C2061 syntax error: identifier 'CRect' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 126
Error C2535 'void CImageViewportWnd::GetROI(void) const': member function already defined or declared Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 126
Error C3646 'GetPixelString': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 131
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 131
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 131
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 146
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 150
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 153
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 154
Error C3646 'TranslatePointToNativeView': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 168
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 168
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 168
Error C3646 'TranslatePointToDestinationView': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 169
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 169
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 169
Error C3646 'GetDstRectFromCurrentScalingOptions': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 172
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 172
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 172
Error C3646 'afx_msg': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 180
Error C3646 'BOOL': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 180
Error C3646 'OnEraseBkgnd': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 180
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 180
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 180
Error C2144 syntax error: 'void' should be preceded by ',' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 181
Error C2143 syntax error: missing ')' before ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 181
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 181
Error C2144 syntax error: 'void' should be preceded by ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 182
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 182
Error C3646 'BOOL': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 183
Error C3646 'OnMouseWheel': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 183
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 183
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 183
Error C2144 syntax error: 'void' should be preceded by ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 184
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 184
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 184
Error C2144 syntax error: 'void' should be preceded by ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 185
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 185
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 185
Error C2144 syntax error: 'void' should be preceded by ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 186
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 186
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 186
Error C2144 syntax error: 'void' should be preceded by ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 187
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 187
Error C2061 syntax error: identifier 'CPoint' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 187
Error C3646 'BOOL': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 188
Error C3646 'OnSetCursor': unknown override specifier Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 188
Error C2059 syntax error: '(' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 188
Error C2238 unexpected token(s) preceding ';' Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 188
Error C1003 error count exceeds 100; stopping compilation Project1 C:\Program Files\Teledyne DALSA\Sapera\Classes\Gui\ImageViewportWnd.h 188

If you know of a better way to build this project or can simplify the steps to build and run it without errors, or even suggest modifications to the code, I would greatly appreciate it.

1

There are 1 answers

1
Mike Kinghan On

A simple suggestion first. The documentation you have quoted:

  • Include SapClassBasic.h in the program source code (it includes all other required headers)
  • Add $(SAPERADIR)\Classes\Basic and $(SAPERADIR)\Include in Project | Properties | C/C++ | General | Additional Include Directories

Follow the additional steps below to compile and link an application that uses the GUI Classes:

  • Include SapClassGui.h in the program source code (it includes all other required headers)
  • Add $(SAPERADIR)\Classes\Gui in Project | Properties | C/C++ | General | Additional Include Directories

suggests that SapClassBasic.h should be #include-ed before SapClassGui.h. But your program has them the other way round:

#include "SapClassGui.h"
#include "conio.h"
#include "SapClassBasic.h"

This would lead to compilation errors if some class GuiThing defined in SapClassGui.h (or in a header file #include-ed by SapClassGui.h) is derived from another class BasicThing that is defined in SapClassBasic.h (or in a header file #include-ed by SapClassBasic.h), and the compiler cannot accomplish the definition of GuiThing because the definition of BasicThing is not yet known.

Read your very first compilation error and you will see that it is of that sort.

So try:

#include "conio.h"
#include "SapClassBasic.h"     
#include "SapClassGui.h"

and see how your build goes.

It doesn't really matter where conio.h goes.

I am not wholly convinced that any of the existing compilations errors will be eliminated by this move. If not, I may have further input.