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!
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.
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 to
main' 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 2Do you have some suggestions? Thank you so much for your support!