CMM-22 / a2

CMM Assignment 2 - Kinematic walking controller
1 stars 0 forks source link

Building error which seems to steam from template code. #27

Closed dtetruash closed 2 years ago

dtetruash commented 2 years ago

I am implementing the assignment currently, but am unable to check if my code builds properly since I am running into the following errors when building all.

...
[build] [ 72%] Building CXX object src/libs/gui/CMakeFiles/gui.dir/src/shadow_map_fbo.cpp.o
[build] <command-line>: error: initializer-string for ‘char [100]’ is too long [-fpermissive]
[build] <command-line>: note: in definition of macro ‘CRL_DATA_FOLDER’
[build] make[2]: *** [src/libs/gui/CMakeFiles/gui.dir/build.make:90: src/libs/gui/CMakeFiles/gui.dir/src/application.cpp.o] Error 1
[build] make[2]: *** Waiting for unfinished jobs....
[build] make[1]: *** [CMakeFiles/Makefile2:557: src/libs/gui/CMakeFiles/gui.dir/all] Error 2
[build] make: *** [Makefile:146: all] Error 2
[build] Build finished with exit code 2

Since the build process fails outside my code, I assume there is an issue with the setup. I have tries to find the char[100] symbol in the codebase, but could not find the exact mention. Extending any char arrays which I've found to char[1000] let's say also did not fix this...

I've checked for updates to the template codebase via the git log, but did not find anything which addressed this.

Please point me in the right direction with this. Best.

azurite commented 2 years ago

I had this error too. It comes from your repository location on your computer having a filepath that is longer than 100 characters. Moving the repo closer to the root somewhere where it has a short filepath fixed the error for me.

spolinski commented 2 years ago

I had the same issue... image

I just increased the size of the char array to 140, then it was working fine. For me it was line 99 in this file: src/libs/gui/include/gui/application.h image

dtetruash commented 2 years ago

Oh man, never have I seen a more C-like error in my life. Yes, now the build process succeeds, thanks guys! Now the app complains a have missing mesh files, and crashes. I'll go look in the template again.

dtetruash commented 2 years ago

This turned out to be a duplicate of #6