Issue in building Fesapi-example-code for C++

Hi,

I’m trying to build example code given in:

For that I’m trying to generate makefile using CMAKE utility.
But in the generation process I’m getting below errors in cmake.txt source file.
Please find the screenshot below.

x-special/nautilus-clipboard
copy
file:///home/ubtadmin/Pictures/Screenshot%20from%202021-11-08%2017-00-10.png

Can you please instruct me for the process I’m following to resolve it?

Thanks,
Jinal.

Hi Jeenal,

There is no screenshot.

Hi Philippe,

PFA.

It seems you try to build the example in a standalone way. This is not possible with this CMake File, you would need to create your own if you want to do that.
If you want to build the example as delivered in Github, you need to follow the documentation and

OPTIONALLY, you can build the tutorial example by setting WITH_EXAMPLE cmake variable to ON"

directly on the main (i.e. FESAPI root) CMake File.

Thanks Philippe,

I’m able to generate makefile for example code.
Now, how to generate .exe file from example code and Fesapi root code?

Please let me know the process.

Hi Jeenal,
This forum focuses only on FESAPI, not on C++ build. I think your question is out of scope. The community may answer to you but I would bet the opposite.
Look to your C++ documentation (which mainly depends on your OS, your compiler) in order to find this answer or ask this kind of question on more general forum (such as stack overflow) or contract a C++ developer would be my recommendation.

As a start of answer, a makefile allows you to type “make” in a shell (same directory than the Makefile) in order to run the build.

Hi Philippe,

I’ve build the makefile as suggested and .so files are generated.
Now can you please tell what can be the process after make build?

You should have an “example” executable which has been built next to your .so file if you have correctly configured your cmake build.
Just execute it.

@philippeVerney thanks for your quick response. I’m able to execute sample code now.

I’ve few more questions relevant to Fesapi source & example code:

  1. What is the purpose of this example code? And by executing, what is it printing in its output?

  2. After Fesapi source build, it is generating .so (dynamic) libraries. Can we generate static library instead? If yes then how?

  3. There’s one fetpapiServer as in link below
    GitHub - F2I-Consulting/fetpapiServer
    Can this server be build like simulator?

Hi Jeenal

  1. This example creates a RESQML file (epc + h5) on disk with some very basic RESQML data, reads back this RESQML file and print some information about what has been read.

  2. Please create another thread/post for another question. Nobody would be able to find the question/answer otherwise which would lead to a non productive answer…

  3. Same answer than 2. And there is a dedicated forum about FETPAPI not to mix it with FESAPI : FETPAPI - F2i-consulting

Finally, I am quite busy honoring contracts for this end of year. Don’t expect quick answer on my side. I hope you’ll get answers from the community in the mean time.