From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4F4757EE80 for ; Sun, 24 Mar 2013 12:43:42 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of romain.beauxis@gmail.com) identity=pra; client-ip=209.85.215.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="romain.beauxis@gmail.com"; x-sender="romain.beauxis@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of romain.beauxis@gmail.com designates 209.85.215.50 as permitted sender) identity=mailfrom; client-ip=209.85.215.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="romain.beauxis@gmail.com"; x-sender="romain.beauxis@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f50.google.com) identity=helo; client-ip=209.85.215.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="romain.beauxis@gmail.com"; x-sender="postmaster@mail-la0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYCADvmTlHRVdcygmdsb2JhbABDx1wIFg4BAQsJFBIGJIJrATgBAw0FEF0SAQUBIogVAw8Mo1+PLYNyJw2JVQEBBAySUwOWZ48iFimBWYJVOw X-IPAS-Result: AlYCADvmTlHRVdcygmdsb2JhbABDx1wIFg4BAQsJFBIGJIJrATgBAw0FEF0SAQUBIogVAw8Mo1+PLYNyJw2JVQEBBAySUwOWZ48iFimBWYJVOw X-IronPort-AV: E=Sophos;i="4.84,900,1355094000"; d="scan'208";a="9024513" Received: from mail-la0-f50.google.com ([209.85.215.50]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Mar 2013 12:43:41 +0100 Received: by mail-la0-f50.google.com with SMTP id ec20so9574721lab.23 for ; Sun, 24 Mar 2013 04:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:cc:content-type; bh=sF/z+XUmDmXgfeyvtNSTdeARamdp3hJUZx1pRXlF+6Y=; b=wab9W4lySU5B4fA3RvqegP+p7n/w2qavdMelL889X7xAyAe46+C7GplDJUCfOw+78f hQnxlNUM+ISPxvvou7mBiGO9v0da5ku647JEbVuO4o3U5RQ7WjwBJd2RXdxq6TBVX7Cx R37afyrxAThKFX5FrnVTtIfEqcZiKB70TJdmzC7hidHW2g5QZ0kGo7ngVC8+3i/Pxtgh lTPkCBsDIi7ODx4Lmx/hXm+RFEpGHrJxo9hPOW5uUrhRrsg00fqGIjoD1eZMifCWjqbO WoZtUkj994ciwnkAeS+KS6ywjF4v9/5eAUy5yT3Gkhf6nvojhE0J8Guz6UC9o1mpdCwS kzXQ== X-Received: by 10.112.137.162 with SMTP id qj2mr1280236lbb.26.1364125421060; Sun, 24 Mar 2013 04:43:41 -0700 (PDT) MIME-Version: 1.0 Sender: romain.beauxis@gmail.com Received: by 10.112.73.233 with HTTP; Sun, 24 Mar 2013 04:43:21 -0700 (PDT) From: Romain Beauxis Date: Sun, 24 Mar 2013 12:43:21 +0100 X-Google-Sender-Auth: iwbotKt6WGY3G-7dwTGLPet0UK0 Message-ID: To: OCaml List Cc: Samuel Mimram Content-Type: text/plain; charset=ISO-8859-1 X-Validation-by: romain.beauxis@gmail.com Subject: [Caml-list] Mingw-ocaml and C++ Hi all, I have extracted the debian-specific build for mingw-ocaml into a standalone build: https://github.com/savonet/mingw-ocaml You should be able to use it to build mingw-ocaml for windows 32 and 64 bit. It has been updated with the latest ocaml (4.00.1) and flexdll (0.30) However, I am having some serious trouble with C++ FlexDLL linking on Debian wheezy and sid. This is a problem that occurs when building OCaml modules based on C++ libraries. Here's a simple way to reproduce. It does not involve OCaml but showcases the exact issue I am having with libraries and is damn simple: - Install mingw-ocaml or compile it from the sources above. Doesn't matter the version, bug is the same. - Create this file: % cat hello.cpp #include int main() { std::cout << "Hello World!" << std::endl; return 0; } - Compile it: % i686-w64-mingw32-g++ -c hello.cpp - Link it with gcc: % i686-w64-mingw32-gcc -o hello.exe ./hello.o -lstdc++ - Try to link it with flexlink: % flexlink -exe -chain mingw -L/usr/i686-w64-mingw32/lib -o hello-flexlink.exe -lstdc++ hello.o -v -v -v ** Use cygpath: false ** Search path: /usr/i686-w64-mingw32/lib /usr/lib/gcc/i686-w64-mingw32/4.6 /mingw/lib ** Default libraries: crt2.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 ** Cannot resolve symbols for hello.o: __ZSt4cout ** open: /usr/i686-w64-mingw32/lib/crt2.o ** open: /usr/i686-w64-mingw32/lib/libmingw32.a ** open: /usr/lib/gcc/i686-w64-mingw32/4.6/libgcc.a ** open: /usr/i686-w64-mingw32/lib/libmoldname.a ** open: /usr/i686-w64-mingw32/lib/libmingwex.a ** open: /usr/i686-w64-mingw32/lib/libmsvcrt.a ** open: /usr/i686-w64-mingw32/lib/libuser32.a ** open: /usr/i686-w64-mingw32/lib/libkernel32.a ** open: /usr/i686-w64-mingw32/lib/libadvapi32.a ** open: /usr/i686-w64-mingw32/lib/libshell32.a zsh: exit 2 flexlink -exe -chain mingw -L/usr/i686-w64-mingw32/lib -o hello.exe -lstdc++ Any input or directions to grab more information would be greatly welcome as I am pretty dry on how to fix this issue currently.. Thanks! Romain