csukuangfj / OpenCNN

An Open Convolutional Neural Network Framework in C++ From Scratch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile problem and some include problems

ganler opened this issue · comments

Compile problem:

  • sys: Ubuntu 16.04
  • compiler: g++7.4

And I fixed this by modifying the cmakelist:

if(UNIX AND NOT APPLE)
    target_link_libraries(
        core
        -pthread
        -lprotobuf # What I added.
        )
endif()

include problems

You should #include <functional> in your network.hpp, or another compile error with gcc.

Das is alles. Danke.(Ich kann nur ein bisschen Deutsch sprechen.)

BTW. You'd better tell the users to install gtest(It seems that you've ignored this in your dependency list.).

@ganler

  1. Could you please show the cmake log for this line:
    message(STATUS "protobuf libs: ${Protobuf_LIBRARY}")

It should find your protobuf library automatically and link it without your intervention.

  1. Gtest is included in the project (https://github.com/csukuangfj/OpenCNN/tree/master/test/gtest) and it is compiled from source. No separate installation is required.

  2. I am considering to replace the cmake build system with Bazel.


Super! Sie können viel Deutsch schreiben 👍

@csukuangfj

  1. It seems that my cmake didn't find protobuf:
    Here is the messages:
➜  CXXTEST cd build
➜  build cmake ..
-- protobuf libs: 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ganler/Desktop/GanlerCodes/CXXTEST/build
➜  build 
  1. I ignored there's already a gtest in your project.(This is my first time to use the tools of google, sorry.)

Ich bin ein Student(Informatik) von der Tongji Uni(China). Es gibt viele Deutsche Studenten in unserer Uni.