How to build/install libcurl on windows with MinGW [closed] - c

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 months ago.
Improve this question
I have installed MinGW-w64 with MSYS to compile a project I built on Linux on Windows. I do not want to use MSVC, though I did find info on how to build libcurl with it. On Linux I just installed libcurl with "pacman -S libcurl" and could do.
#include <curl/curl.h>
...
I tried to install the precompiled libraries for windows from https://curl.se/windows/ but I have no idea where to put the files from "include" and the files from "lib"
EDIT
I checked https://curl.se/download.html and it seems like I only need the headers and not the all the binaries since curl is already installed on Windows 10. However the only ways there seems to be to install libcurl header files is either with vcpkg which I do not really want to use and cygwin which seems redundant because I have MinGW-w64 installed. Is there a way to install the libcurl package without vcpkg or cygwin.

I found a solution! On MSYS2 just do "pacman -Sy mingw-w64-x86_64-curl" which installs the binaries and the header files. The info was here https://everything.curl.dev/get/windows/win-msys2 and I have no idea why this is not in the curl downloads page or why MinGW on MSYS is not mentioned at all.

Related

missing library "jansson_private_config.h" in Jansson c parser library [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
Anyone ever used jansson C-parser for parsing JSON objects. I was trying to study the library, for same I compiled it with the sample program given with it. Added the header files required but one header file is missing named "jansson_private_config.h" I have downloaded this library completely I am not sure where I can get this ??
You can find in documentation how to build this library for windows:
Get CMake and Visual Studio
unpack source
In a command line
cd .../jansson-2.12
mkdir build
cd build
cmake -G "Visual Studio XX 20XX" ..
You should be done
Alternate method
You can also edit manually the jansson_config.h.in, ommitting to define HAVE_CONFIG_H which cause the jansson_private_config.h to be included in .c files.
Note that this #ifdef HAVE_CONFIG_H test has been forgetten in test_dump.c, which won't compile if you don't fix it.
Fix proposal (not tested):
+#ifdef HAVE_CONFIG_H
#include "jansson_private_config.h"
+#endif

In Git for Windows Bash, how to install "get-apt" and "sudo" and all those basic commands? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I was working mostly on Mac, so I have no idea about how to set up git environment on Windows 8.
Today, I was going to start AngularJS on my Windows Machine. On tutorial, I saw it requires git, and I downloaded the "Git for windows", called "MINGW64".
On tutorial, it asked me to use command:
apt-get install nodejs-legacy npm
nodejs --version
npm --version
Then, the bash told me
bash: apt-get: command not found
I was confused and thought the apt-get is a pre-installed thing, so I changed the git setting and re-installed it with all different settings. It still the same.
And I am so surprised that "sudo" is not found as well.
Next, I searched online and had many vague answer which directs to the path, I think that might be the issue, but the person did not clearly say how to solve it. I was hoping can get some help from Stack overflow community how can I install the apt-get and other basic commands packages on git for windows.
If it is a duplicate, please guide me a bit how to use the correct words to mention this issue. I have tried "git for windows has no apt-get", etc on Google, and no luck for me. This has bothered me whole night. Thanks!
Link for AngularJS Tutorial
Link for git for windows
Update
With WSL, It's now possible to run a complete Linux system, like Ubuntu, inside Windows. and one can install everything, including Node and Git there in the WSL Linux. Just like Sarah Cooley pointed in the other answer from her.
Pre-WSL Answer
If you want Node.js and npm on Windows, you can download them from nodejs.org, apt-get is for Linux (Debian based). Here's a guide.
And Git for Windows is a Windows based Git distribution, it's a separate project from Node.js, and it provides a limited set of linux-like CLI tools compiled natively for Windows.
If you setup PATH correctly, you can indeed run node commands in the Bash shell of Git for Windows.
The entire Ubuntu user mode (including BASH) now runs on Windows. Apt-get node etc all work. Check it out. Docs here.

bits/c++config.h no such file or directory [duplicate]

This question already has answers here:
Missing include "bits/c++config.h" when cross compiling 64 bit program on 32 bit in Ubuntu
(10 answers)
Closed 6 years ago.
I'm trying to compile my code including iostream lib on ubuntu 14.04, using qt creator, but when I execute it I got this error message:
/usr/include/c++/4.8/iostream:38: error: bits/c++config.h: No such file or directory #include <bits/c++config.h>
Even if I try to compile it by terminal, I have the same trouble.
This is a c code that i got from my friend, not c++, but I still need to include this iostream. I made a huge research and can't find anything useful on internet, just posts talking about 64 or 32 bits OS. I'm new on programming scene, I'm glad for your patience, thanks.
It does look like a cross-platform compilation issue. Did you install the multilib packages:
sudo apt install gcc-multilib g++-multilib
If you've installed a version of gcc / g++ that doesn't ship by default you'll want to match the version as well:
sudo apt-get install gcc-4.8-multilib g++-4.8-multilib
Related question.

Broken vanity-gen program on OSX [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I can't get Vanitygen to compile.
Is there a way to install an older version of openssl and make (compile) the program with it?
Or can someone who has an older version of openssl simply compile it for me and give me a link for it?
Are there any other ways to get this program to compile for me on OSX?
Thanks.
Can someone please make me a precompiled vanity-gen program on OSX?
You should try here:
http://www.rentacoder.com
http://www.freelancer.com
It would compile fine if only I had a slightly older version of openssl.
You can get any version you like: OpenSSL source code, tarballs.
I can't compile because I have the latest version of openssl.
You should fetch an older version of OpenSSL.
Is there a way to install an older version of openssl and make (compile) the program with it?
Yes, there is!
$ wget http://w.tar.gzssl.org/source/openssl-0.9.8y
$ tar -xzf openssl-0.9.8y.tar.gz
$ cd openssl-0.9.8y
$ ./config shared --prefix=/usr/local/ssl-0.9.8
$ make all
$ sudo make install
You might need to add export CFLAGS="-fPIC", but I don't recall. Do it right before you execute config.
Then, add /usr/local/ssl-0.9.8/include as an include directory; and add /usr/local/ssl-0.9.8/lib as a library directory.
Here's what it looks like on my Debian machine:
$ ls /usr/local/ssl-0.9.8/lib/
engines libcrypto.so libssl.a libssl.so.0.9.8
libcrypto.a libcrypto.so.0.9.8 libssl.so pkgconfig
Are there any other ways to get this program to compile for me on OSX?
OS X is another can of worms (or can be another can of worms). Once you have a version of OpenSSL installed that suites your taste, come back with configuration problems for vanity-gen.
For Mac OS X, I believe you can perform the following:
$ export KERNEL_BITS=64
$ ./config ...
If you don't export KERNEL_BITS, I believe you get a 32-bit configuration by default.

how to compile curl from source in windows?

I created this question for the suggestion under this answer
The cURL documentation explains in details how to build it on Windows. You should read docs/INSTALL in the source tarball.
There are many way to do this depending you compiler (msvc, mingw, borland) and build system (makefile, IDE)...

Resources