Bakkes / CPPRP

Fast C++ Rocket League replay parser
Mozilla Public License 2.0
33 stars 9 forks source link

Compilation Issues #3

Closed nickbabcock closed 5 years ago

nickbabcock commented 5 years ago

Hey I'm trying to get a feel of the output for CPPRP-JSON, but I'm having a few issues compiling.

make -j5 RELEASE=1

Executes just fine, but the issue is that the following line is what is executed for CPPRP-JSON

g++ -c -DDEBUG=0 -DRELEASE=1 -fPIC -std=c++17 -static-libstdc++ -ICPPRP -I./CPPRP/data -I./CPPRP/exceptions -I./CPPRP/generated -I./libs/rapidjson/include/ -ICPPRPJSON -w  -Wfatal-errors -DCPPRP_PRETTYSUPPORT -lstdc++fs  -O3 -s -g -DNDEBUG -o build/CPPRPJSON/main.cpp.o CPPRPJSON/main.cpp

The -c is the problem, afaik. Dropping it as an argument should create an executable because as of right now it does not create a executable:

build/CPPRPJSON/main.cpp.o: ELF 64-bit LSB relocatable, x86-64, version 1 (GNU/Linux), with debug_info, not stripped

I manually executed g++ without the -c and received a few compilation errors:

CPPRP/CPPRPJSON/main.cpp:400: undefined reference to `CPPRP::ReplayFile::Load()'
CPPRP/CPPRPJSON/main.cpp:425: undefined reference to `CPPRP::ReplayFile::DeserializeHeader()'
CPPRP/CPPRPJSON/main.cpp:416: undefined reference to `CPPRP::ReplayFile::VerifyCRC(CPPRP::CrcCheck)'
CPPRP/CPPRPJSON/main.cpp:440: undefined reference to `CPPRP::ReplayFile::Parse(unsigned int, int, unsigned int)'

Anyways just curious if it's obvious what I'm doing wrong.

Cheers.

Bakkes commented 5 years ago

I'm not entirely sure to be honest. The project does need to run the build sequentially as I haven't set up the makefile properly yet, Could you try make clean && make RELEASE=1 without the -j param? The makefile is set up to build the cpprp+cpprpjson and will write the binary to ./build/test.

Alternatively, maybe it's an older g++ version? Although probably not since you didn't get any compile errors, I'm using g++-9 to compile the project.

nickbabcock commented 5 years ago

The makefile is set up to build the cpprp+cpprpjson and will write the binary to ./build/test

Ah I didn't realize that the test executable was the right one, thank you -- it's working now.