Register libusb for pkg-confg - pkg-config

I want to compile the lm4flash tool for my Stellaris Launchpad, but when I run the make command, it returns an error, because libusb 1.0 isn't installed.
How can I register the libusb library on pkg-config (I only have the bare dev-library you can download from their website)?
I tried to search for a solution with Google, but I couldn't find a answer.
I'm using Windows 7 and already installed pkg-config, a cross compiler (for ARM) and MinGW.
Thank you for help,
Turakar

Related

Can not find LLVM library files

I have been trying to set up llvm on my linux. I am running fedora. I have tried installing llvm through dnf install llvm and it appears to be installed on my computer. However, in my c++ code any header I try to include from it shows error. I am currently trying to do it manually but if you have any answers I would be grateful if you share it with me. Thanks.
You can use the following commands to find where are the include directory and LLVM libraries in your Linux system. Then they can be included into your compilation command.
llvm-config --includedir
llvm-config --libfiles
I don't use Fedora, but in my Linux Mint 20, these commands return:
/usr/lib/llvm-10/include
/usr/lib/llvm-10/lib/libLLVM-10.so

Compile libusb library on Windows

I am writing C++ application which will be using libusb library. This application will be working on both linux and windows systems. Currently I am preparing application for windows system. I downloaded compiled libusb library, and I am linking it to my application. I am also using mingw compilers. Unfortunately while linker creates exe file it complains about missing __ms_vsnprintf functions. I think the libusb library I am linking was compiled in environment which was using missing functions. So I think building new libusb library on windows will solve that problem. In libusb repository (git://git.libusb.org/libusb.git) I found in file INSTALL_WIN, that I can build libusb using Visual Studio or Windows DDK/WDK. Unfortunately I can't install it. I also noticed, in root libusb directory there are some build linux scripts. Is there some other way to build libusb library without Visual Studio but only with mingw compilers?
Note: I am using Windows 7 64 bit
libusb ships with a Visual Studio project you can use to build libusb on Windows. They are located in the msvc folder, an example is libusb_dll_2017.vcxproj.
Easier still, libusb has also been integrated in vcpkg, so you can just run vcpkg install libusb to get started.

mDNSResponder compilation on MinGW

I am trying to build mDNSResponder on MinGW for a very important project. I have MinGW installed and I've downloaded the latest version of mDNSResponder from Apple's site. There doesn't seem to be any way to build for MinGW. Also, it appears to require pthreads in order to build
I also found the Bonjour SDK, but it seems like it only has MSVC compatible libraries in it and when I try to use reimp in MinGW to convert them to DLLs I get the "invalid or corrupt library" error back. Presumably this is because MS changes it's name mangling scheme on occasion.
Any help at all would be appreciated!
Greg

Trying to compile libgcrypt 1.5.0 with MinGW32 on Windows 7

I have attempted compiling libgcrypt 1.5.0 with MinGW32 on Windows 7 to no avail. I have already installed the GCC C/C++ compiler and binutils as part of MinGW32, but when I enter autogen.sh --build-w32 it tells me that there is no cross compiler kit installed...?
Despite searching around for answers, I still do not have a clue as to what is going on. How on earth do you compile libgcrypt with MinGW32? And why is it so stupidly difficult? Most standard libs usually provide a Visual Studio project, but the only Visual Studio project I can find for libgcrypt is extremely dated (1.2.2).
The --build-w32 switch is for compiling for Windows on Linux. The readme doesn't mention compiling for Windows on Windows.
I would say try autogen.sh with no arguments and hope it works.
If that doesn't work, install Linux I guess. :/

How to build GCC 4.7 on Windows?

How to build GCC 4.7 on Windows?
You are not finding instructions on how to do this because you cannot natively use gcc in Windows. Your options are either to use gcc through Cygwin [installation instructions] or install the MinGW port [installation instructions].
You can also find links to these projects on the Installing GCC: Binaries page.
Well, gcc 4.7 has not yet been released (it will be released in a few months, i.e. spring 2012).
If your system is Windows then I am sorry for you, Linux is so much better :-) More seriously, you should search for cygwin gcc. I cannot help you in that case.
What did you try? Building GCC (even on Linux) is not an easy task. Some hints (which I guess are also relevant to cygwin & windows).
Always configure and build the compiler in a build tree outside of the source tree. (this is a common mistake).
take care of the many dependencies (and their versions), like the Parma Polyhedra Library, Cloog, etc ...
some features of GCC are not available on Windows. In particular plugins.
I would suppose that installing the binary of an older variant of cygwin gcc (and all the related packages) will help.
But really, I know nothing about Windows. And if you really want a very recent GCC and you cannot install Linux (or build GCC cygwin), you might perhaps consider running Linux in an emulator or virtual machine.

Resources