Bug 23454 - Compile 0.0.9 with MinGW
Summary: Compile 0.0.9 with MinGW
Alias: None
Product: nice
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Olivier Crête
QA Contact:
Depends on:
Reported: 2009-08-21 21:50 UTC by David Hoyt
Modified: 2015-06-26 14:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Patch 1 (341 bytes, patch)
2009-08-21 21:50 UTC, David Hoyt
Details | Splinter Review
Patch 2 (360 bytes, patch)
2009-08-21 21:50 UTC, David Hoyt
Details | Splinter Review
Patch 3 (797 bytes, patch)
2009-08-21 21:50 UTC, David Hoyt
Details | Splinter Review
Patch 4 (264 bytes, patch)
2009-08-21 21:51 UTC, David Hoyt
Details | Splinter Review

Description David Hoyt 2009-08-21 21:50:06 UTC
Created attachment 28844 [details] [review]
Patch 1

I've been able to get libnice to compile using mingw and gcc 4.4.0 on windows xp. It involved a few patches and then a script to do the rest. This was very quick and dirty - if you wanted to incorporate it, you would probably want to clean it up a bit. I didn't want to get into modifying the makefile, so this is just an example bash script (mine's a bit diff. due to how I have things configured):

CFLAGS="-D_SSIZE_T_ -D_WIN32_WINNT=0x0501 -I<SourceDir>/stun/"
LDFLAGS="-lwsock32 -lws2_32"
./configure --disable-static --enable-shared
#Create a shared library from the archive
cd "nice/.libs"
dlltool --export-all-symbols -D libnice-0.dll -l libnice.dll.a -z in.def libnice.a
ranlib libnice.dll.a
gcc -shared -s -mwindows -def in.def $LibFlags -o libnice-0.dll libnice.a -liphlpapi -lwsock32 -lws2_32 -lglib-2.0 -lgobject-2.0
cd "../../"
make install

cd "nice/.libs/"
cp -f libnice.dll.a ../../
cp -f libnice-0.dll ../../

lib.exe /name:libnice-0.dll /out:nice.lib /machine:$MSLibMachine /def:in.def
cp -f nice.lib ../../
#Update .la to reflect shared lib we created
cd "<InstallDir>"
sed -e "s/library_names=''/library_names='libnice.dll.a'/g" -e "s/old_library='libnice.a'/old_library=''/g" -e "s/dlname=''/dlname='..\/bin\/libnice-0.dll'/g" libnice.la > libnice.mod.la
mv -f "libnice.mod.la" "libnice.la"
Comment 1 David Hoyt 2009-08-21 21:50:33 UTC
Created attachment 28845 [details] [review]
Patch 2
Comment 2 David Hoyt 2009-08-21 21:50:46 UTC
Created attachment 28846 [details] [review]
Patch 3
Comment 3 David Hoyt 2009-08-21 21:51:03 UTC
Created attachment 28847 [details] [review]
Patch 4
Comment 4 Youness Alaoui 2010-03-18 13:02:47 UTC
Could you please provide a proper patch. Cleaned up version of these patches, and hopefully one that doesn't require an additional script somewhere (if it's not doable, then provide the script so it can be added as a Makefile.mingw file for example).
I will merge and release a new version of libnice once I have your fixes.
Thank you.
Comment 5 Philip Withnall 2015-06-26 14:17:41 UTC
Migrated to Phabricator: http://phabricator.freedesktop.org/T118

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.