Please enable JavaScript to view this site.

IDS peak 2.10.0 / uEye+ firmware 3.34

Navigation: C: Programming with IDS peak > Creating a project > Creating a project for Visual Studio

Creating a project with Visual Studio (comfortC, genericC++)

Scroll Previous Top Next More

IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.

If you need to configure a project in Visual Studio manually, perform the following steps:

1.Create a project in Visual Studio.

2.Specify the following path as an additional include directory:

a.comfortC:
$(IDS_PEAK_COMFORT_SDK_PATH)\api\include\

b.genericC++:
$(IDS_PEAK_GENERIC_SDK_PATH)\api\include\;$(IDS_PEAK_GENERIC_SDK_PATH)\ipl\include\

3.Define the additional library directories:

a.comfortC:
$(IDS_PEAK_COMFORT_SDK_PATH)\api\lib\x86_64\

b.genericC++:
$(IDS_PEAK_GENERIC_SDK_PATH)\api\lib\x86_64\;$(IDS_PEAK_GENERIC_SDK_PATH)\ipl\lib\x86_64\

4.Specify the libraries used as an additional dependency:

a.comfortC:
ids_peak_comfort_c.lib

b.genericC++:
ids_peak.lib; ids_peak_ipl.lib

5.Define the post-build event by command line:

a.comfortC:
copy "$(IDS_PEAK_COMFORT_SDK_PATH)\api\lib\x86_64\*.dll" "$(OutDir)"

b.genericC++:
copy "$(IDS_PEAK_GENERIC_SDK_PATH)\api\lib\x86_64\*.dll " "$(OutDir)"
copy "$(IDS_PEAK_GENERIC_SDK_PATH)\ipl\lib\x86_64\*.dll" "$(OutDir)"

Fig. 266: Include directory

Fig. 266: Include directory

Fig. 267: Library directory

Fig. 267: Library directory

Fig. 268: Other dependencies

Fig. 268: Other dependencies

Fig. 269: Post-build event

Fig. 269: Post-build event

Test the configuration with a short test code, e.g.:

main.c (comfortC)

#include <stdio.h>
 
#include <ids_peak_comfort_c/ids_peak_comfort_c.h>
 
int main()
{
  peak_status status = peak_Library_Init();
  if (PEAK_ERROR(status))
  {
      printf("Library could not be initialized!\n");
      return 1;
  }
 
  printf("Library successfully initialized!\n");
  (void)peak_Library_Exit();
  return 0;
}

main.cpp (genericC++)

#include <iostream>
 
#include <peak/peak.hpp>
 
int main()
{
  peak::Library::Initialize();
  std::cout << "Library successfully initialized!" << std::endl;
 
  peak::Library::Close();
  return 0;
}

© 2024 IDS Imaging Development Systems GmbH