Prebuilt Windows binaries

727 views
Skip to first unread message

Petri Lehtinen

unread,
Apr 12, 2011, 2:04:44 PM4/12/11
to jansso...@googlegroups.com
I've been requested to provide prebuilt Jansson binaries for Windows.
I don't have access to Windows tools myself, and don't really have a
clue about how libraries work on Windows.

So, is there someone on this list who knows how these things work on
Windows? Is it reasonable to provide a prebuilt library? Are there
multiple architectures that need to be supported? Should it be a DLL,
a static library, or both?

Also, if it is reasonable to do this, I'll need someone to do this
upon each release, or at least it needs to be documented well so that
I can have someone do it each time without much hassle.

Petri

Kevin

unread,
Apr 23, 2011, 3:58:23 PM4/23/11
to Jansson users
I only use Windows and I was able to compile Jansson 2.0.1 using the
"MinGW with MSYS" installer and following the documentation tutorial
here:
http://www.digip.org/jansson/doc/2.0/gettingstarted.html#compiling-and-installing-jansson

I assume the "MinGW with MSYS" installer came with GNU Autotools
(autoconf, automake, libtool) automatically.

In the MSYS command line I typed these commands:
./configure
make
make check
make install

In the file "jansson_config.h", I had to change:
#define JSON_INTEGER_IS_LONG_LONG 1
to
#define JSON_INTEGER_IS_LONG_LONG 0
or an error would occur during make.

Doing so created the following files:
libjansson.a
libjansson.la
libjansson.lai

I then put all of those lib files in a "lib" folder, and all of the
*.h files in an "include" folder.

To compile with gcc, I use this batch file:
gcc --version
gcc janssontest.c -Id:\code\jansson\include -Ld:\code\jansson\lib -
ljansson -Wl,-subsystem,console -Wall -O0 -s -o release/
janssontest.exe
pause

Petri Lehtinen

unread,
Apr 24, 2011, 2:01:59 PM4/24/11
to jansso...@googlegroups.com
Kevin wrote:
> I only use Windows and I was able to compile Jansson 2.0.1 using the
> "MinGW with MSYS" installer and following the documentation tutorial
> here:
> http://www.digip.org/jansson/doc/2.0/gettingstarted.html#compiling-and-installing-jansson
>
> I assume the "MinGW with MSYS" installer came with GNU Autotools
> (autoconf, automake, libtool) automatically.

Thanks, however this is not what I meant really. The "de facto"
toolchain for Windows seems to be Microsoft Visual C++, and AFAIK
libraries created with gcc don't work with it.

Reply all
Reply to author
Forward
0 new messages