Menu

Client7z was unable to unpack a long header file

Help
kanejons
2024-03-12
2024-03-13
  • kanejons

    kanejons - 2024-03-12

    Tell me, I'm faced with the fact that I get an error in this place. I guess it's because of the number of characters, but I'm not sure. It is in the archive itself that folders and files with a long name are located. That's what I think is wrong, but I'm not sure. Here is the archive folder inside: C:\Users\ssssssssss.s\Desktop\test\hkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkj.

     CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
        if (!_outFileStreamSpec->Open(fullProcessedPath, CREATE_ALWAYS))
        {
          PrintError("Cannot open output file", fullProcessedPath);
          return E_ABORT;
        }
    

    Tell me what could be the matter?if required, I can attach the archive itself

     
  • Igor Pavlov

    Igor Pavlov - 2024-03-12

    -DZ7_LONG_PATH is requred for long paths:

    CFLAGS = $(CFLAGS) -DZ7_LONG_PATH
    

    also it's better to enable unicode, if it was not enabled in another places:

    CFLAGS = $(CFLAGS) -DUNICODE -D_UNICODE
    
     

    Last edit: Igor Pavlov 2024-03-12
  • kanejons

    kanejons - 2024-03-12

    Okay, where do I turn it on?

     
  • Igor Pavlov

    Igor Pavlov - 2024-03-12

    for command line you can edit makefile.
    if you use VS gui program, you can have Unicode option and you can define -DZ7_LONG_PATH in some project options.

     
  • kanejons

    kanejons - 2024-03-12

    I have unicode installed. I use qt and cmake to run. And I can't figure out where to write this parameter -DZ7_LONG_PATH

     
  • Igor Pavlov

    Igor Pavlov - 2024-03-12

    what C++ compiler do you use?
    unicode is defined via -D switch.
    All C++ compilers support -D switch to define macro for C++/C files.

    Look some makefiles for different projects, and probably you will see -D examples there.

     

    Last edit: Igor Pavlov 2024-03-12
  • kanejons

    kanejons - 2024-03-12

    I am using the MSVC2019 compiler. -D found it in another place.

     
  • kanejons

    kanejons - 2024-03-13

    Good afternoon, how else can I insert a long path? Is it only through the makefile or is there another way in the code?

     
  • Igor Pavlov

    Igor Pavlov - 2024-03-13

    -DZ7_LONG_PATH must solve problem with long paths.
    Use latest source code: 7-Zip 23.01
    And compile all C++ files of project with -DZ7_LONG_PATH.

     

    Last edit: Igor Pavlov 2024-03-13

Log in to post a comment.