I have build libx264-125.dll by MinGW and Msys. However, libx254-125.dll need call cygwin1.dll and cyggcc_s-1.dll for run.
Could anyone tell me how to build static libx264-125.dll
Thanks for your help!
If you built x264 using MSYS and MinGW GCC, it does not depend on the Cygwin dll. Make sure the "gcc" used in the build process is the MinGW one, not the Cygwin executable.
Related
What is the current process to use the mingw toolchain that is included with cygwin?
There use to be a -mno-cygwin option used with gcc.
The mingw versions have x86_64-w64-mingw32- or i686-w64-mingw32- added to their exe names. Currently I just use these directly but I want to use cmake.
Cygwin also includes cmake. How would I configure it to use the mingw toolset that is included with cygwin? I also see some Qt5 *.cmake modules included in the Qt5 libraries for mingw.
Thanks.
I've found a temporary workaround. Just define these two environment variables:
set CC=/usr/bin/x86_64-w64-mingw32-gcc.exe
set CXX=/usr/bin/x86_64-w64-mingw32-g++.exe
Define them before running the cmake that is included with cygwin.
Seems to work.
I'm trying to get cmake working on msys2. I try to compile some code that I've been given for another project and:
CMake Error: Could not create named generator MSYS Makefiles
I've found this thread and this thread and tried to follow the instructions...only to realize that the wiki that the threads eventually link back to never states where msys stores toolchains. Googling around didn't really help.
Even more oddly, the program that I'm trying to use somehow runs and produces valid data despite throwing an error due to the missing cmake. I don't get it.
I've never used msys before; as someone who's brand new to msys2/cygwin and can't even understand the lingo, how do I get cmake installed and working?
Sounds like you are specifying a -G "MSYS Makefiles" as the CMake generator, but CMake doesn't recognize that generator. When I use CMake on msys2 I just use the default Unix Makefiles generator and everything works just fine. Also, on my current msys2 install, CMake doesn't seem to have a MSYS Makefile generator that I can see (running cmake --help will list the available generators). Try running cmake without the -G option. Also, make sure make is installed first via pacman -Sy make.
I'm trying to use CppUTest in Windows, first step is to get it to work and I already have problems. These are the things I've tried:
First Approach
With CMake, using the cmake GUI I can do the configure and generate command and I get something in the output directory, but no binaries and no libraries, just a bunch of cmakefiles. The CMake GUI says everything went OK during the configuration and generation steps, however the libraries (.lib files) are not generated in the output directory... is there something I am missing? I've never used CMake before.
Second approach
With MinGW and msys alone, running cmd in Windows and executing a MinGW shell by typing sh in the Windows terminal, afterwards I execute the following commands:
cd <CppUTest folder>
mount c:\mingw /mingw
./autogen.sh
./configure
make
The build process starts but it fails with a message indicating that pthread.h was not found in MinGW directory. If I install the pthread-win32 package with the MinGW package manager and repeat the same steps as above the build process starts but fails with a message indicating that the structure timespec is defined in time.h and pthread.h.
I've tried to follow this same procedure with CppUTest 3.6 and it works perfectly fine, I get the .lib files, so I guess I will have to continue with this for now.
Does anyone know how to build CppUTest 3.7 (latest release) with MinGW or CMake?
In the end I used Cygwin to compile it, I couldn't find a way to compile it with MinGW properly, I added a dirty trick to make it compile under MinGW (handled the timespec redifinition) but chances are that is going to cause issues.
Just make sure that you use Cygwin aswell to compile your tests, something that I found out after making this question (https://www.youtube.com/watch?v=oVmd0P85D8o).
I have an issue when using find_path CMake command on windows and MinGW.
Consider the following code:
find_path(FINDPATH_TEST stdio.h)
message(STATUS "FINDPATH_TEST: "${FINDPATH_TEST})
It works perfectly on Linux, printing: FINDPATH_TEST: /usr/include.
However running this code on windows using "MinGW Makefiles" as CMake generator will output:
FINDPATH_TEST: FINDPATH_TEST-NOTFOUND
Why find_path not works in the same way on MinGW?
You could check this thread: http://www.cmake.org/pipermail/cmake/2007-November/017813.html It explains what are the default search paths for various operating systems. You should see which one is used in your case (mingw).
I also believe that you may need to use the cmake version compiled for mingw in order to get that working on your mingw environment. I am not 100% sure though because I didn't use cmake with mingw.
I am trying to use vtune with my application compiled with mingw in Windows.
When I try to see souce code information, vtune says the is not line information in the resulting executable. I am compiling with -g option so I dont know where is the problem. So the questions are:
Is it possible to profile with a program compiled with mingw in windows? It looks like all is ready for MS-VC, but not for mingw.
If so, is it needed to change the object format (coff, xcoff, DWARF, ....)?
maybe if someone post an example it would be valuable.
Solved, compiled with
-gstabs -g3