Archive for the ‘MinGW’ Category
Removing MinGW dll dependencies
libgcc_s_dw2-1.dll
Passing -static-libgcc will remove this dependency for all languages other than C.
Note: C++ exceptions depends on this option.
mingwm10.dll
Remove -mthreads option from your makefile.
Note: Multithreading and C++ exceptions depends on this option.
How to disable system bell in msys
$HOME/.inputrc:
set bell-style none
First libdiesel release
I’ve just made first version of libdiesel library publicly available. I will not release the sources due to personal constraints, but you’re welcome to use compiled version. So far, there is only MinGW32 static version, but I may compile this library for other platform as well. Just leave me a comment.
Mingw on Linux
I’m using mingw for years, but never tried to use it on linux machine as crosscompiler. Today I’ve had first experience. First thing I’ve noticed is how actually easy to install such environment – there is fully automated build script, available from mingw site. Pros: – Speed. Native environment vs MSys is much faster. Cons: – Building Windows things from Linux means to transfer them from one machine to another.
Gettext compilation on MSys
Trying to build gettext library on MSys I’ve got some errors related to pthread. Included readme states you need to have Cygwin for that. For those, who prefer MSys over Cygwin here goes a quick fix:
Add -lpthread to LIBS section in gettext-runtime/src/Makefile and gettext-tools/src/Makefile.
Remove tests target from gettext-runtime/Makefile and gettext-tools/Makefile.
Be happy.
Libiconv compilation sed on msys error
Trying to build libiconv library under msys environment, I’ve got sed related errors:
Fortunately, there is solution on the Net.
--- tmp/libiconv-1.12/windows/windres-options 2007-05-27 19:42:10 +0100
+++ src/libiconv-1.12/windows/windres-options 2008-05-28 13:41:03 +0100
@@ -14,20 +14,29 @@
fi
version="$1" # something like 2.0 or 2.17 or 2.17.3 or 2.17.3-pre3
-sed_extract_major='/^[0-9]/{s/^([0-9]*).*/1/p;q}
+sed_extract_major='
+/^[0-9]/{
+ s/^([0-9]*).*/1/p
+ q
+}
a
0
-q
'
-sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]([0-9]*).*/1/p;q}
+sed_extract_minor='
+/^[0-9][0-9]*[.][0-9]/{
+ s/^[0-9]*[.]([0-9]*).*/1/p
+ q
+}
a
0
-q
'
-sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]([0-9]*).*/1/p;q}
+sed_extract_subminor='
+/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{
+ s/^[0-9]*[.][0-9]*[.]([0-9]*).*/1/p
+ q
+}
a
0
-q
'
{
Credit goes to Keith Marshall.
Add application icon on Eclipse with MinGW
sourceresource.rc:
Project > Properties > C/C++ Build > Settings > Tool Settings > MinGW C++ Linker > Miscellaneous > Other objects:
Project > Properties > C/C++ Build > Settings > Build Steps > Pre-build steps > Command:
Create MinGW library from dll
For this, you need pexports tool from mingw-utils.
dlltool -D library.dll -d library.def -l library.dll.a
Note, that if dll was built by different environment than gcc, this probably will not work because of the naming conventions. If this the case, read here. Read the rest of this entry »