<div>I&#39;ve downloaded the branch but�am having some compilation problem.�The error line is &quot;<span lang="EN">cl : Command line error D8021 : invalid numeric argument &#39;/Wl,-DLL&#39;&quot;</span></div>
<div><span lang="EN"></span>�</div>
<div><span lang="EN">The full build output is listed below:</span></div>
<div><span lang="EN"><span lang="EN">
<p>Using Visual Studio install at /C/Program Files/Microsoft Visual Studio 8</p>
<p>Using Windows SDK install at /C/Program Files/Microsoft SDKs/Windows/v6.0A</p>
<p>+ autoreconf -i</p>
<p>C:\MinGW\bin\libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])&#39; to <a href="http://configure.ac">configure.ac</a> and</p>
<p>C:\MinGW\bin\libtoolize: rerunning C:\MinGW\bin\libtoolize, to keep the correct libtool macros in-tree.</p>
<p>C:\MinGW\bin\libtoolize: Consider adding `-I m4&#39; to ACLOCAL_AMFLAGS in Makefile.am.</p>
<p>+ ./configure CC=cl.exe LD=link.exe CFLAGS=-nologo</p>
<p>checking for a BSD-compatible install... /bin/install -c</p>
<p>checking whether build environment is sane... yes</p>
<p>checking for a thread-safe mkdir -p... /bin/mkdir -p</p>
<p>checking for gawk... gawk</p>
<p>checking whether make sets $(MAKE)... yes</p>
<p>checking for style of include used by make... GNU</p>
<p>checking for gcc... cl.exe</p>
<p>checking whether the C compiler works... yes</p>
<p>checking for C compiler default output file name... conftest.exe</p>
<p>checking for suffix of executables... .exe</p>
<p>checking whether we are cross compiling... no</p>
<p>checking for suffix of object files... obj</p>
<p>checking whether we are using the GNU C compiler... no</p>
<p>checking whether cl.exe accepts -g... yes</p>
<p>checking for cl.exe option to accept ISO C89... none needed</p>
<p>checking dependency style of cl.exe... none</p>
<p>checking how to run the C preprocessor... cl.exe -E</p>
<p>checking for grep that handles long lines and -e... /bin/grep</p>
<p>checking for egrep... /bin/grep -E</p>
<p>checking for ANSI C header files... yes</p>
<p>checking for sys/types.h... yes</p>
<p>checking for sys/stat.h... yes</p>
<p>checking for stdlib.h... yes</p>
<p>checking for string.h... yes</p>
<p>checking for memory.h... yes</p>
<p>checking for strings.h... no</p>
<p>checking for inttypes.h... no</p>
<p>checking for stdint.h... no</p>
<p>checking for unistd.h... no</p>
<p>checking minix/config.h usability... no</p>
<p>checking minix/config.h presence... no</p>
<p>checking for minix/config.h... no</p>
<p>checking whether it is safe to define __EXTENSIONS__... yes</p>
<p>checking for gcc... (cached) cl.exe</p>
<p>checking whether we are using the GNU C compiler... (cached) no</p>
<p>checking whether cl.exe accepts -g... (cached) yes</p>
<p>checking for cl.exe option to accept ISO C89... (cached) none needed</p>
<p>checking dependency style of cl.exe... (cached) none</p>
<p>checking build system type... i686-pc-mingw32</p>
<p>checking host system type... i686-pc-mingw32</p>
<p>checking for as... as</p>
<p>checking for dlltool... dlltool</p>
<p>checking for objdump... objdump</p>
<p>checking how to print strings... printf</p>
<p>checking for a sed that does not truncate output... /bin/sed</p>
<p>checking for fgrep... /bin/grep -F</p>
<p>checking for non-GNU ld... link.exe</p>
<p>checking if the linker (link.exe) is GNU ld... no</p>
<p>checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B</p>
<p>checking the name lister (/bin/nm -B) interface... BSD nm</p>
<p>checking whether ln -s works... no, using cp -p</p>
<p>checking the maximum length of command line arguments... 8192</p>
<p>checking whether the shell understands some XSI constructs... yes</p>
<p>checking whether the shell understands &quot;+=&quot;... yes</p>
<p>checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format... func_convert_file_msys_to_w32</p>
<p>checking for link.exe option to reload object files... -r</p>
<p>checking for objdump... (cached) objdump</p>
<p>checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL</p>
<p>checking for dlltool... (cached) dlltool</p>
<p>checking how to associate runtime and link libraries... func_cygming_dll_for_implib</p>
<p>checking for ar... ar</p>
<p>checking for archiver @FILE support... @</p>
<p>checking for strip... strip</p>
<p>checking for ranlib... ranlib</p>
<p>checking command to parse /bin/nm -B output from cl.exe object... ok</p>
<p>checking for sysroot... no</p>
<p>checking for mt... mt</p>
<p>checking if mt is a manifest tool... yes</p>
<p>checking for dlfcn.h... no</p>
<p>checking for objdir... .libs</p>
<p>checking for cl.exe option to produce PIC... -DDLL_EXPORT -DPIC</p>
<p>checking if cl.exe PIC flag -DDLL_EXPORT -DPIC works... yes</p>
<p>checking if cl.exe static flag works... yes</p>
<p>checking if cl.exe supports -c -o file.obj... no</p>
<p>checking if cl.exe supports -c -o file.obj... (cached) no</p>
<p>checking if we can lock with hard links... yes</p>
<p>checking whether the cl.exe linker (link.exe) supports shared libraries... yes</p>
<p>checking dynamic linker characteristics... Win32 link.exe</p>
<p>checking how to hardcode library paths into programs... immediate</p>
<p>checking whether stripping libraries is possible... yes</p>
<p>checking if libtool supports shared libraries... yes</p>
<p>checking whether to build shared libraries... yes</p>
<p>checking whether to build static libraries... yes</p>
<p>checking for ANSI C header files... (cached) yes</p>
<p>checking for inline... __inline</p>
<p>checking location of AMQP codegen directory... /home/vincentcheong/rabbit/windows_rabbitmq-c/../rabbitmq-codegen</p>
<p>checking finding a python with simplejson installed... python</p>
<p>checking for poptGetContext in -lpopt... no</p>
<p>checking for xmlto... no</p>
<p>configure: creating ./config.status</p>
<p>config.status: creating Makefile</p>
<p>config.status: creating librabbitmq/Makefile</p>
<p>config.status: creating tests/Makefile</p>
<p>config.status: creating examples/Makefile</p>
<p>config.status: creating tools/Makefile</p>
<p>config.status: creating tools/doc/Makefile</p>
<p>config.status: creating config.h</p>
<p>config.status: config.h is unchanged</p>
<p>config.status: executing depfiles commands</p>
<p>config.status: executing libtool commands</p>
<p>+ sed -i -e &#39;s/^fix_srcfile_path=.*$/fix_srcfile_path=&quot;&quot;/;s/^deplibs_check_method=.*$/deplibs_check_method=pass_all/;/^archive_cmds=/s/-link -dll/&amp; -implib:\\$libname.\\$libext/&#39; libtool</p>
<p>+ make</p>
<p>make all-recursive</p>
<p>make[1]: Entering directory `/home/vincentcheong/rabbit/windows_rabbitmq-c&#39;</p>
<p>Making all in librabbitmq</p>
<p>make[2]: Entering directory `/home/vincentcheong/rabbit/windows_rabbitmq-c/librabbitmq&#39;</p>
<p>make all-am</p>
<p>make[3]: Entering directory `/home/vincentcheong/rabbit/windows_rabbitmq-c/librabbitmq&#39;</p>
<p>/bin/sh ../libtool --tag=CC --mode=link cl.exe -I./windows -DBUILDING_LIBRABBITMQ -I../msinttypes -nologo -no-undefined -o <a href="http://librabbitmq.la">librabbitmq.la</a> -rpath /usr/local/lib amqp_mem.lo amqp_table.lo amqp_connection.lo amqp_socket.lo amqp_api.lo socket.lo amqp_framing.lo ws2_32.lib </p>

<p>*** Warning: Linking the shared library <a href="http://librabbitmq.la">librabbitmq.la</a> against the</p>
<p>*** static library ws2_32.lib is not portable!</p>
<p>libtool: link: rm -fr .libs/rabbitmq.exp</p>
<p>libtool: link: /bin/nm -B .libs/amqp_mem.obj .libs/amqp_table.obj .libs/amqp_connection.obj .libs/amqp_socket.obj .libs/amqp_api.obj .libs/socket.obj .libs/amqp_framing.obj | sed -n -e &#39;s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 _\2 \2/p&#39; | /bin/sed -e &#39;/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/&#39; | /bin/sed -e &#39;/^[AITW][ ]/s/.*[ ]//&#39; | sort | uniq &gt; .libs/rabbitmq.exp</p>

<p>libtool: link: if test &quot;x`/bin/sed 1q .libs/rabbitmq.exp`&quot; = xEXPORTS; then sed -n -e s/\\\(.*\\\)/-link\ -EXPORT:\\\1/ -e 1\!p &lt; .libs/rabbitmq.exp &gt; .libs/rabbitmq-0.dll.exp; else sed -e s/\\\(.*\\\)/-link\ -EXPORT:\\\1/ &lt; .libs/rabbitmq.exp &gt; .libs/rabbitmq-0.dll.exp; fi</p>

<p>libtool: link: cl.exe -o .libs/rabbitmq-0.dll .libs/amqp_mem.obj .libs/amqp_table.obj .libs/amqp_connection.obj .libs/amqp_socket.obj .libs/amqp_api.obj .libs/socket.obj .libs/amqp_framing.obj ws2_32.lib @.libs/rabbitmq-0.dll.exp -Wl,-DLL</p>

<p>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86</p>
<p>Copyright (C) Microsoft Corporation. All rights reserved.</p>
<p>cl : Command line warning D9035 : option &#39;o&#39; has been deprecated and will be removed in a future release</p>
<p>cl -link -EXPORT:amqp_abort</p>
<p>-link -EXPORT:amqp_basic_ack</p>
<p>-link -EXPORT:amqp_basic_consume</p>
<p>-link -EXPORT:amqp_basic_get</p>
<p>-link -EXPORT:amqp_basic_publish</p>
<p>-link -EXPORT:amqp_bytes_free</p>
<p>-link -EXPORT:amqp_bytes_malloc</p>
<p>-link -EXPORT:amqp_bytes_malloc_dup</p>
<p>-link -EXPORT:amqp_channel_close</p>
<p>-link -EXPORT:amqp_channel_open</p>
<p>-link -EXPORT:amqp_connection_close</p>
<p>-link -EXPORT:amqp_constant_is_hard_error</p>
<p>-link -EXPORT:amqp_constant_name</p>
<p>-link -EXPORT:amqp_cstring_bytes</p>
<p>-link -EXPORT:amqp_data_in_buffer</p>
<p>-link -EXPORT:amqp_decode_method</p>
<p>-link -EXPORT:amqp_decode_properties</p>
<p>-link -EXPORT:amqp_decode_table</p>
<p>-link -EXPORT:amqp_destroy_connection</p>
<p>-link -EXPORT:amqp_empty_array,DATA</p>
<p>-link -EXPORT:amqp_empty_bytes,DATA</p>
<p>-link -EXPORT:amqp_empty_table,DATA</p>
<p>-link -EXPORT:amqp_encode_method</p>
<p>-link -EXPORT:amqp_encode_properties</p>
<p>-link -EXPORT:amqp_encode_table</p>
<p>-link -EXPORT:amqp_error_string</p>
<p>-link -EXPORT:amqp_exchange_declare</p>
<p>-link -EXPORT:amqp_frames_enqueued</p>
<p>-link -EXPORT:amqp_get_channel_max</p>
<p>-link -EXPORT:amqp_get_rpc_reply</p>
<p>-link -EXPORT:amqp_get_sockfd</p>
<p>-link -EXPORT:amqp_handle_input</p>
<p>-link -EXPORT:amqp_login</p>
<p>-link -EXPORT:amqp_maybe_release_buffers</p>
<p>-link -EXPORT:amqp_method_has_content</p>
<p>-link -EXPORT:amqp_method_name</p>
<p>-link -EXPORT:amqp_new_connection</p>
<p>-link -EXPORT:amqp_open_socket</p>
<p>-link -EXPORT:amqp_os_error_string</p>
<p>-link -EXPORT:amqp_pool_alloc</p>
<p>-link -EXPORT:amqp_pool_alloc_bytes</p>
<p>-link -EXPORT:amqp_queue_bind</p>
<p>-link -EXPORT:amqp_queue_declare</p>
<p>-link -EXPORT:amqp_queue_delete</p>
<p>-link -EXPORT:amqp_queue_purge</p>
<p>-link -EXPORT:amqp_queue_unbind</p>
<p>-link -EXPORT:amqp_release_buffers</p>
<p>-link -EXPORT:amqp_release_buffers_ok</p>
<p>-link -EXPORT:amqp_send_frame</p>
<p>-link -EXPORT:amqp_send_header</p>
<p>-link -EXPORT:amqp_send_method</p>
<p>-link -EXPORT:amqp_set_sockfd</p>
<p>-link -EXPORT:amqp_simple_rpc</p>
<p>-link -EXPORT:amqp_simple_wait_frame</p>
<p>-link -EXPORT:amqp_simple_wait_method</p>
<p>-link -EXPORT:amqp_socket_init</p>
<p>-link -EXPORT:amqp_table_entry_cmp</p>
<p>-link -EXPORT:amqp_tune_connection</p>
<p>-link -EXPORT:amqp_tx_commit</p>
<p>-link -EXPORT:amqp_tx_rollback</p>
<p>-link -EXPORT:amqp_tx_select</p>
<p>-link -EXPORT:amqp_version</p>
<p>-link -EXPORT:empty_amqp_pool</p>
<p>-link -EXPORT:init_amqp_pool</p>
<p>-link -EXPORT:recycle_amqp_pool</p>
<p>cl : Command line error D8021 : invalid numeric argument &#39;/Wl,-DLL&#39;</p>
<p>make[3]: *** [<a href="http://librabbitmq.la">librabbitmq.la</a>] Error 2</p>
<p>make[3]: Leaving directory `/home/vincentcheong/rabbit/windows_rabbitmq-c/librabbitmq&#39;</p>
<p>make[2]: *** [all] Error 2</p>
<p>make[2]: Leaving directory `/home/vincentcheong/rabbit/windows_rabbitmq-c/librabbitmq&#39;</p>
<p>make[1]: *** [all-recursive] Error 1</p>
<p>make[1]: Leaving directory `/home/vincentcheong/rabbit/windows_rabbitmq-c&#39;</p>
<p>make: *** [all] Error 2</p></span></span></div><br><br>
<div class="gmail_quote">On Tue, Nov 9, 2010 at 7:30 PM, David Wragg <span dir="ltr">&lt;<a href="mailto:david@rabbitmq.com">david@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">Vincent Cheong &lt;<a href="mailto:vincentcheongst@gmail.com">vincentcheongst@gmail.com</a>&gt; writes:<br>&gt; I have downloaded the rabbit mq c client from<br>&gt; <a href="http://hg.rabbitmq.com/rabbitmq-c/summary" target="_blank">http://hg.rabbitmq.com/rabbitmq-c/summary</a> and compiled the the library using<br>
&gt; mingw successfully.<br>&gt;<br>&gt; However when I compile against the library (librabbitmq.dll.a) and run my<br>&gt; application, I get a run-time check failure of the value of esp being not<br>&gt; properly saved. Any help would be deeply appreciated.<br>
<br></div></div>Are you trying to call the mingw-compiled library from code developed in<br>Visual Studio? �That doesn&#39;t work, as explained in the README.windows<br>file.<br><br>But we have addressed this issue in the bug23423 branch. �If you switch<br>
to that branch, README.windows contains instructions on how to build the<br>library with Microsoft&#39;s compiler, so that it is callable from code<br>developed in VS.<br><br>That branch still has to go through code review here, but it should work<br>
fine. �Let me know if you have any problems with it.<br><br>David<br><font color="#888888"><br>--<br>David Wragg<br>Staff Engineer, RabbitMQ<br>SpringSource, a division of VMware<br></font></blockquote></div><br>