This page describes how to get started to create FindSurface SDK applications.
Open Visual Studio
Select File > New > Project... menu.
In the New Project dialog,
under 2017 : choose the Win32 Console Application on Win32 category.
above 2017 : choose the Windows Desktop Wizard on Windows Desktop category.
Be sure followings for this tutorial.
> under 2017
> above 2017
After creating project, you need to set your SDK path. In this tutorial, we assume that the install path of the FindSurface SDK is C:\CurvSurf_SDK\
.
Go to Project > Properties.
In the Property Pages dialog, choose the VC++ Directories.
Select Include Directories, and click <Edit...>.
In the Include Directories dialog, add include path of FindSurface SDK. For example, C:\CurvSurf_SDK\include
.
Set the Library Directories in the same way.
(option) In the Property Pages dialog, choose the Debugging. And set the Environment field like below.
PATH=%PATH%;path-to-findsurface-dll
For example, C:\CurvSurf_SDK\lib\x86
or C:\CurvSurf_SDK\lib\x64
In the Property Pages dialog, choose the Linker > Input.
Add FindSurface.lib to Additional Dependencies.
Add a new file named main.c or main.cpp to your project. Type the below code, compile and run the sample code.
#include <FindSurface.h>
#include <stdio.h>
int main(void)
{
FIND_SURFACE_CONTEXT ctx;
int ret;
ret = createFindSurface(&ctx);
if (ret == FS_NO_ERROR) {
printf("Hello FindSurface\n");
releaseFindSurface(ctx);
}
return 0;
}
In this page, you learned how to set up development environment for FindSurface SDK. Proceed to the following link to learn how to use FindSurface SDK.
Note: FindSurface SDK uses different .so files for build and runtime. Read install guide for more detail.
Create a new file named main.c or main.cpp. Type the below code, compile and run the sample code with following command.
Note: In this example, we assume that dummy .so file exists on
/home/CurvSurf/libFindSurface/lib_import/x86_64
.
Use your dummy .so file path that specified on install step.
#include <FindSurface.h>
#include <stdio.h>
int main(void)
{
FIND_SURFACE_CONTEXT ctx;
int ret;
ret = createFindSurface(&ctx);
if (ret == FS_NO_ERROR) {
printf("Hello FindSurface\n");
releaseFindSurface(ctx);
}
return 0;
}
$ gcc -o HelloFindSurface main.c -L/home/CurvSurf/libFindSurface/lib_import/x86_64 -lFindSurface
(Run demo) $ ./HelloFindSurface
In this page, you learned how to set up development environment for FindSurface SDK. Proceed to the following link to learn how to use FindSurface SDK.