serizba / cppflow

Run TensorFlow models in C++ without installation and without Bazel
https://serizba.github.io/cppflow/
MIT License
779 stars 177 forks source link

Error loading .pb model #176

Closed FrancescaCi closed 1 year ago

FrancescaCi commented 2 years ago

Hi, I am trying to load my .pb model with the following example code: // Read the graph cppflow::model model("../model/"); But I had some problem during make compilation: Scanning dependencies of target example2 [ 50%] Building CXX object CMakeFiles/example2.dir/main.cpp.o [100%] Linking CXX executable example2 /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference tomain' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/example2.dir/build.make:85: example2] Error 1 make[1]: [CMakeFiles/Makefile2:76: CMakeFiles/example2.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

Do you have some suggestions? Thank you so much for your support!

serizba commented 2 years ago

Hi @FrancescaCi

According to your error your program is missing a main function. Are you trying to compile an executable? If so, you will need to add a main entry point.

Best

serizba commented 1 year ago

Closing due to inactivity.