Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error #34

Closed
tiantianaixuexi opened this issue Jul 7, 2020 · 3 comments
Closed

build error #34

tiantianaixuexi opened this issue Jul 7, 2020 · 3 comments

Comments

@tiantianaixuexi
Copy link

g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c Cycles.cc -o Cycles.o
g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c Util.cc -o Util.o
g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c testHelper/GeneratedCode.cc -o testHelper/GeneratedCode.o
g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c Log.cc -o Log.o
g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c NanoLog.cc -o NanoLog.o
g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c RuntimeLogger.cc -o RuntimeLogger.o
g++ -std=c++17 -g -O3 -DPREPROCESSOR_NANOLOG -I. -ItestHelper -I"../googletest/googletest"/include -c TimeTrace.cc -o TimeTrace.o
g++ -std=c++11 -isystem "../googletest/googletest"/include -I"../googletest/googletest" -c "../googletest/googletest"/src/gtest-all.cc -L. -lgtest -lrt -pthread
g++: error: ../googletest/googletest/src/gtest-all.cc: No such file or directory
GNUmakefile:44: recipe for target 'libgtest.a' failed
make: *** [libgtest.a] Error 1

@syang0
Copy link
Member

syang0 commented Jul 7, 2020

You need to initialize the gtest submodule in the main repository.

git submodule update --init

syang0 added a commit that referenced this issue Jul 19, 2020
The NanoLog library unit tests will now trigger whenever a push
or pull request is made. The tests will also no longer build by
default when invoking 'make' in the runtime directory. This should
help with issues such as issue #34 where users attempt to build
the library.
@syang0
Copy link
Member

syang0 commented Jul 20, 2020

Hi tiantianaixuexi,

I've changed the GNUmakefile so it does not build the unit tests by default, and I've added a supplemental guide to building the unit tests in the README.md. Hopefully this'll prevent future confusion.

Best Regards,
Stephen Yang

@syang0 syang0 closed this as completed Jul 20, 2020
@tiantianaixuexi
Copy link
Author

OK,Thank you

syang0 added a commit that referenced this issue Jul 21, 2020
Preprocessor NanoLog now compiles its library and object files in a separate
directory from C++17 NanoLog. This helps prevent the common accident of
accidentally mixing the two libraries as evidenced by issues #34 and #35.
syang0 added a commit that referenced this issue Jul 21, 2020
Preprocessor NanoLog now compiles its library and object files in a separate
directory from C++17 NanoLog. This helps prevent the common accident of
accidentally mixing the two libraries as evidenced by issues #34 and #35.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants