About Monkey 2 › Forums › Monkey 2 Development › Compile error – file name too long?
This topic contains 6 replies, has 3 voices, and was last updated by
Angus 1 year, 5 months ago.
-
AuthorPosts
-
November 15, 2017 at 3:12 pm #11715
I’ve just received this error message from the compiler:
Monkey1234567891011121314Parsing...Semanting...Translating...Compiling..._r.cppc1xx: fatal error C1081: 'C:/Users/Angus/Documents/Code/Monkey2/EditorCurrent/code/ManagedObjects/test2xxxxxxxxx.buildv1.1.08/windows_debug_msvc/build/_1_1_1_1_1_1_1_1_1_1_1Monkey2_5v1.1.08_2modules_2stb_5image_5write_2stb_5image_5write.buildv1.1.08_2windows_0debug_0msvc_2include_2_0r.cpp.obj': file name too longBuild error: System command 'cl -c -EHs -W0 -MT -I"C:/Monkey2-v1.1.08/modules/" -I"C:/Monkey2-v1.1.08/modules/monkey/native" -I"C:/Users/Angus/Documents/Code/Monkey2/EditorCurrent/code/ManagedObjects/" -I"C:/Monkey2-v1.1.08/modules/freetype/freetype-2.6.3/include/" -I"C:/Monkey2-v1.1.08/modules/openal/openal-soft/include/" -I"C:/Monkey2-v1.1.08/modules/gles20/angle/include/" -I"C:/Monkey2-v1.1.08/modules/sdl2/SDL/include/" -Fo"C:/Users/Angus/Documents/Code/Monkey2/EditorCurrent/code/ManagedObjects/test2xxxxxxxxx.buildv1.1.08/windows_debug_msvc/build/_1_1_1_1_1_1_1_1_1_1_1Monkey2_5v1.1.08_2modules_2stb_5image_5write_2stb_5image_5write.buildv1.1.08_2windows_0debug_0msvc_2include_2_0r.cpp.obj" "C:/Monkey2-v1.1.08/modules/stb-image-write/stb-image-write.buildv1.1.08/windows_debug_msvc/include/_r.cpp"' failed.cl -c -EHs -W0 -MT -I"C:/Monkey2-v1.1.08/modules/" -I"C:/Monkey2-v1.1.08/modules/monkey/native" -I"C:/Users/Angus/Documents/Code/Monkey2/EditorCurrent/code/ManagedObjects/" -I"C:/Monkey2-v1.1.08/modules/freetype/freetype-2.6.3/include/" -I"C:/Monkey2-v1.1.08/modules/openal/openal-soft/include/" -I"C:/Monkey2-v1.1.08/modules/gles20/angle/include/" -I"C:/Monkey2-v1.1.08/modules/sdl2/SDL/include/" -Fo"C:/Users/Angus/Documents/Code/Monkey2/EditorCurrent/code/ManagedObjects/test2xxxxxxxxx.buildv1.1.08/windows_debug_msvc/build/_1_1_1_1_1_1_1_1_1_1_1Monkey2_5v1.1.08_2modules_2stb_5image_5write_2stb_5image_5write.buildv1.1.08_2windows_0debug_0msvc_2include_2_0r.cpp.obj" "C:/Monkey2-v1.1.08/modules/stb-image-write/stb-image-write.buildv1.1.08/windows_debug_msvc/include/_r.cpp"Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24225.1 for x86Copyright (C) Microsoft Corporation. All rights reserved.I added the “x”s at the end of the filename test2 just to be sure. When they’re not in the filename it compiles ok.
I’m not 100% confident I’ve got MSVC installed correctly, my code seems to run ok otherwise. Is there a setting somewhere that’d allow me to get around this?
Obviously, I could just clean up my work folders and shorten their names, which I’ll probably do anyway
The code that generated the error was this, it was just a small test which I only post here to be certain it’s not just my imagination that it otherwise runs fine:
Monkey1234567891011121314151617181920212223242526272829303132333435363738#Import "<std>"Using std..Class IntObjField value:IntEndFunction Main:void()Local obj1:IntObj=New IntObjLocal obj2:Object=Cast<Object>(New IntObj)Local i:Int=0Local n:Int=0,num:Int=1000000Local time:Long=Microsecs()For n=1 To numi+=1NextPrint "adding one to an integer "+String(num)+" times:"+String(Microsecs()-time)+" microseconds"time=Microsecs()For n=1 To numobj1.value+=1NextPrint "adding one to an integer inside an object "+String(num)+" times:"+String(Microsecs()-time)+" microseconds"time=Microsecs()For n=1 To numCast<IntObj>(obj2).value+=1NextPrint "adding one to an integer in an object that needs cast "+String(num)+" times:"+String(Microsecs()-time)+" microseconds"EndNovember 15, 2017 at 5:02 pm #11720Yes you have to use short paths or you may encounter filepath too long errors. The max paths length depends on the os. There is already an issue on github about that. But well it works fine if you use short paths (like C:/mx2-projects/myproject).
November 15, 2017 at 5:10 pm #11721Oh, didn’t realise it was already known. I’ll have to get more familiar with github, thanks!
November 15, 2017 at 10:48 pm #11724The code that generated the error was this,
I think there may be something weird going on here in general.
What was the full path of the monkey2 source file?
What was the full path of the monkey2 installation?
November 16, 2017 at 1:01 am #11730The source is here:
C:\Users\Angus\Documents\Code\Monkey2\EditorCurrent\code\ManagedObjects\test2xxxxxxxxx.monkey2
Without the Xs, it runs.
The Monkey2 installation is:
C:\Monkey2-v1.1.08
November 16, 2017 at 2:23 am #11731Thanks Angus, I will take a look soon-ish
November 16, 2017 at 2:48 am #11733Not exactly a priority, for me personally, just more info. Making my folders acceptable is probably much higher priority.
-
AuthorPosts
You must be logged in to reply to this topic.