I want to download all the files under this directory
link containing .h and .c files
How can I download all files in one go? as a tar file or any other format with the same hierarchy structure of files?
Related
I have a problem with VSC. I started to use it recently and well I have 1 issue with it. My project has multiple folders, those folder just contain .h and .c files, but sometimes I need that .c file from one folder would read functions from .h file from another folder, and well when I include .h file, compiler can't find it. example bellow:
the only thing that works is by including full path to that file:
#include "C:/Users/Name/Desktop/Project/Project_dir/components/configurations/I2C_master.h"
Is this normal for VSC or I don't know how to use linker?
I think your problem here is that you're writing the file path as if the two were located in the same directory.
If you are referencing a file from another directory you should write the relative path like this:
#include "../configurations/I2C_master.h"
I'm using c. And I have a include folder inside my project myProject/include and inside I have all the header files from the SDK I downloaded from the Internet. So my question is how can I tell the gcc to look for the header files inside the include folder?
You can use the -I option with gcc to tell the path where to look for the header files.
From online gcc manual
-Idir
Add the directory dir to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched before the system header file directories. [...]
You can use this option multiple times,
[...] If you use more than one -I option, the directories are scanned in left-to-right order; the standard system directories come after.
I try to read the file header DOCX files and PPTX files to determine if two files, but the two files have the same header.
How can I distinguish PPTX and DOCX.
I have done the following:
Added the path to my include folder under Paths and Symbols->includes tab
The header file now appear in my project folder under includes
The #include files no longer give errors as the project can see the .h files that it needs
After build I get the following error:
fatal error: services.h: No such file or directory
make:*[filename]Error 1
My .c source file now complains that it cant see the include file. How do I fix this?
In Eclipse import a new make file project. Then link the appropriate libraries.
Can i use the zlib library function to compress files. I try to do a file compression using "gzopen()" which is actually working with single file with some problems. When i try to decompress the output file using "WinZip" the file extension is not present in the output. For eg. If I compress a file named "test.pdf", the output file name is coming as "test". (the file content is proper. only problem is with the extension)
fi = (gzFile *)gzopen(destfile,"ab");
gzwrite(fi,buff,bufflen);
gzclose(fi);
When i try to compress two different file(eg "test.pdf" and "sample.pdf") only one file came after extraction using "WinZip"("test"). How to use the zlip file to compress more than one file. I think the problem is with header information in the compressed file. Can i use zlib to compress files?.
You can use the -N or --name option to gzip to have it use the filename stored in the gzip file instead of the name of the gzip file.
You cannot use gzip by itself to store multiple files. For a Windows application, I would recommend libzip for multiple files, which encodes and decodes .zip files. libzip uses zlib for the compression and decompression part.
you could use something like http://gnuwin32.sourceforge.net/packages/libarchive.htm to create a tar and the zip it
zlib (the library) and gzip (the utility) doesn't really do any file management. It doesn't have any concept of file names, so normally the gunzip utility just removes the .gz extension from an extracted file. There is no filename data embedded in the gzipped file, it just works off the filename at the time you unzip it.
gzip also doesn't support compressing multiple files together into the same archive. To do that usually you use the tar command to create one file that contains the individual files you want to compress, then gzip the tar file. that's why you'll see archive.tar.gz or archive.tgz a lot. It's a bunch of files in a tar file which has been compressed with gzip.
zlib only does comression it doesn't handle file names, file data, directory layout etc.
Winzip adds all these to the ZLIB protocol. In the zlib distribution there is a contrib library that gives you zip functions