<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Bug 12795 – Linking shared library fails on Win7 64-bit with x64_64-w64-mingw32-gcc-4.6.3</title>


<link rel="Top" href="http://llvm.org/bugs/">

  


  
    <link rel="Show" title="Dependency Tree"
          href="showdependencytree.cgi?id=12795&hide_resolved=1">
      <link rel="Show" title="Dependency Graph"
            href="showdependencygraph.cgi?id=12795">

      <link rel="Show" title="Bug Activity"
            href="show_activity.cgi?id=12795">
      <link rel="Show" title="Printer-Friendly Version"
            href="show_bug.cgi?format=multiple&id=12795">



    
    
    <link href="skins/standard/global.css"
          rel="alternate stylesheet" 
          title="Classic"><link href="js/yui/assets/skins/sam/autocomplete.css" rel="stylesheet"
        type="text/css" ><link href="js/yui/assets/skins/sam/calendar.css" rel="stylesheet"
        type="text/css" ><link href="skins/standard/global.css" rel="stylesheet"
        type="text/css" ><link href="skins/standard/show_bug.css" rel="stylesheet"
        type="text/css" ><!--[if lte IE 7]>
      



  <link href="skins/standard/IE-fixes.css" rel="stylesheet"
        type="text/css" >
<![endif]-->

    
<link href="skins/contrib/Dusk/global.css" rel="alternate stylesheet"
        type="text/css" title="Dusk">

    

    

    
<script type="text/javascript" src="js/yui/yahoo-dom-event/yahoo-dom-event.js"></script><script type="text/javascript" src="js/yui/cookie/cookie-min.js"></script><script type="text/javascript" src="js/yui/datasource/datasource-min.js"></script><script type="text/javascript" src="js/yui/connection/connection-min.js"></script><script type="text/javascript" src="js/yui/json/json-min.js"></script><script type="text/javascript" src="js/yui/autocomplete/autocomplete-min.js"></script><script type="text/javascript" src="js/yui/calendar/calendar-min.js"></script><script type="text/javascript" src="js/global.js"></script>

    <script type="text/javascript">
    <!--
        YAHOO.namespace('bugzilla');
        YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) {
               if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; };
               var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false;
               return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture);
         };
        if ( "onpagehide" in window || YAHOO.env.ua.gecko) {
            YAHOO.util.Event._simpleRemove(window, "unload", 
                                           YAHOO.util.Event._unload);
        }
        
        function unhide_language_selector() { 
            YAHOO.util.Dom.removeClass(
                'lang_links_container', 'bz_default_hidden'
            ); 
        } 
        YAHOO.util.Event.onDOMReady(unhide_language_selector);

        
        var BUGZILLA = {
            param: {
                cookiepath: '\/',
                maxusermatches: 1000
            },

            string: {
                

                attach_desc_required:
                    'You must enter a Description for this attachment.',
                component_required:
                    'You must select a Component for this bug.',
                description_required:
                    'You must enter a Description for this bug.',
                short_desc_required:
                    'You must enter a Summary for this bug.',
                version_required:
                    'You must select a Version for this bug.'
            }
        };

    // -->
    </script>
<script type="text/javascript" src="js/util.js"></script><script type="text/javascript" src="js/field.js"></script>

    

    
    <link rel="search" type="application/opensearchdescription+xml"
                       title="Bugzilla" href="./search_plugin.cgi">
    <link rel="shortcut icon" href="images/favicon.ico" >
  </head>



  <body onload=""
        class="llvm-org-bugs bz_bug bz_status_NEW bz_product_Build_scripts bz_component_Makefiles bz_bug_12795 yui-skin-sam">



<div id="header">
<div id="banner">
  </div>

<table border="0" cellspacing="0" cellpadding="0" id="titles">
<tr>
    <td id="title">
      <p>Bugzilla – Bug 12795</p>
    </td>

    <td id="subtitle">
      <p class="subheader">Linking shared library fails on Win7 64-bit with x64_64-w64-mingw32-gcc-4.6.3</p>
    </td>

    <td id="information">
      <p class="header_addl_info">Last modified: 2012-12-14 10:24:19 CST</p>
    </td>
</tr>
</table>

<table id="lang_links_container" cellpadding="0" cellspacing="0"
       class="bz_default_hidden"><tr><td>
</td></tr></table>
<ul class="links">
  <li><a href="./">Home</a></li>
  <li><span class="separator">| </span><a href="enter_bug.cgi">New</a></li>
  <li><span class="separator">| </span><a href="describecomponents.cgi">Browse</a></li>
  <li><span class="separator">| </span><a href="query.cgi">Search</a></li>

  <li class="form">
    <span class="separator">| </span>
    <form action="buglist.cgi" method="get"
        onsubmit="if (this.quicksearch.value == '')
                  { alert('Please enter one or more search terms first.');
                    return false; } return true;">
    <input class="txt" type="text" id="quicksearch_top" name="quicksearch" 
           value="">
    <input class="btn" type="submit" value="Search" 
           id="find_top"></form>
  <a href="page.cgi?id=quicksearch.html" title="Quicksearch Help">[?]</a></li>

  <li><span class="separator">| </span><a href="report.cgi">Reports</a></li>

  <li></li>

  <li>
        <span class="separator">| </span>
        <a href="docs/en/html/bug_page.html" target="_blank">Help</a>
      </li>
    
      <li id="new_account_container_top">
        <span class="separator">| </span>
        <a href="createaccount.cgi">New Account</a>
      </li>

    <li id="mini_login_container_top">
  <span class="separator">| </span>
  <a id="login_link_top" href="http://llvm.org/bugs/show_bug.cgi?id=12795&GoAheadAndLogIn=1"
     onclick="return show_mini_login_form('_top')">Log In</a>
  <form action="http://llvm.org/bugs/show_bug.cgi?id=12795" method="POST" 
        class="mini_login bz_default_hidden"
        id="mini_login_top"
        onsubmit="return check_mini_login_fields( '_top' );"
  >
    <input id="Bugzilla_login_top" 
           class="bz_login"
           name="Bugzilla_login"
           onfocus="mini_login_on_focus('_top')"
    >
    <input class="bz_password" 
           id="Bugzilla_password_top" 
           name="Bugzilla_password"
           type="password"
    >
    <input class="bz_password bz_default_hidden bz_mini_login_help" type="text" 
           id="Bugzilla_password_dummy_top" value="password"
           onfocus="mini_login_on_focus('_top')"
    >
    <input type="submit" name="GoAheadAndLogIn" value="Log in" 
            id="log_in_top">
    <script type="text/javascript">
      mini_login_constants = {
          "login" : "login",
          "warning" : "You must set the login and password before logging in."
      };
      
      if (YAHOO.env.ua.gecko || YAHOO.env.ua.ie || YAHOO.env.ua.opera) {
          YAHOO.util.Event.onDOMReady(function() {
              init_mini_login_form('_top');
          });
      }
      else {
          YAHOO.util.Event.on(window, 'load', function () {
              window.setTimeout(function() {
                  init_mini_login_form('_top');
              }, 200);
          });
    }
    </script>
    <a href="#" onclick="return hide_mini_login_form('_top')">[x]</a>
  </form>
</li>
<li id="forgot_container_top">
  <span class="separator">| </span>
  <a id="forgot_link_top" href="http://llvm.org/bugs/show_bug.cgi?id=12795&GoAheadAndLogIn=1#forgot"
     onclick="return show_forgot_form('_top')">Forgot Password</a>
  <form action="token.cgi" method="post" id="forgot_form_top"
        class="mini_forgot bz_default_hidden">
    <label>Login: <input type="text" name="loginname" size="20"></label>
    <input id="forgot_button_top" value="Reset Password" 
           type="submit">
    <input type="hidden" name="a" value="reqpw">
    <a href="#" onclick="return hide_forgot_form('_top')">[x]</a>
  </form>
</li>
</ul>
</div> 

<div id="bugzilla-body">

<div class="navigation">
  
  <i><font color="#777777">First</font></i>
  <i><font color="#777777">Last</font></i>
  <i><font color="#777777">Prev</font></i>
  <i><font color="#777777">Next</font></i>
    
  <i><font color="#777777">This bug is not in your last
    search results.</font></i>
</div>
<script type="text/javascript">
  <!--
  
  /* Outputs a link to call replyToComment(); used to reduce HTML output */
  function addReplyLink(id, real_id) {
      /* XXX this should really be updated to use the DOM Core's
       * createElement, but finding a container isn't trivial.
       */
        document.write('[<a href="#add_comment" onclick="replyToComment(' + 
                       id + ',' + real_id + '); return false;">reply<' + '/a>]');
  }

  /* Adds the reply text to the `comment' textarea */
  function replyToComment(id, real_id) {
      var prefix = "(In reply to comment #" + id + ")\n";
      var replytext = "";
        /* pre id="comment_name_N" */
        var text_elem = document.getElementById('comment_text_'+id);
        var text = getText(text_elem);

        /* make sure we split on all newlines -- IE or Moz use \r and \n
         * respectively.
         */
        text = text.split(/\r|\n/);

        for (var i=0; i < text.length; i++) {
            replytext += "> " + text[i] + "\n"; 
        }

        replytext = prefix + replytext + "\n";


      /* <textarea id="comment"> */
      var textarea = document.getElementById('comment');
      textarea.value += replytext;

      textarea.focus();
  }

  if (typeof Node == 'undefined') {
      /* MSIE doesn't define Node, so provide a compatibility object */
      window.Node = {
          TEXT_NODE: 3,
          ENTITY_REFERENCE_NODE: 5
      };
  }

  /* Concatenates all text from element's childNodes. This is used
   * instead of innerHTML because we want the actual text (and
   * innerText is non-standard).
   */
  function getText(element) {
      var child, text = "";
      for (var i=0; i < element.childNodes.length; i++) {
          child = element.childNodes[i];
          var type = child.nodeType;
          if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) {
              text += child.nodeValue;
          } else {
              /* recurse into nodes of other types */
              text += getText(child);
          }
      }
      return text;
  }


  /* Index all classifications so we can keep track of the classification
   * for the selected product, which could control field visibility.
   */
  var all_classifications = new Array(21);
      all_classifications['Bugzilla Admin'] = 'Unclassified';
      all_classifications['Build scripts'] = 'Unclassified';
      all_classifications['clang'] = 'Unclassified';
      all_classifications['compiler-rt'] = 'Unclassified';
      all_classifications['Documentation'] = 'Unclassified';
      all_classifications['dragonegg'] = 'Unclassified';
      all_classifications['DSA'] = 'Unclassified';
      all_classifications['klee'] = 'Unclassified';
      all_classifications['libc++'] = 'Unclassified';
      all_classifications['libc++abi'] = 'Unclassified';
      all_classifications['libraries'] = 'Unclassified';
      all_classifications['lldb'] = 'Unclassified';
      all_classifications['LNT'] = 'Unclassified';
      all_classifications['new-bugs'] = 'Unclassified';
      all_classifications['PoolAlloc'] = 'Unclassified';
      all_classifications['Projects'] = 'Unclassified';
      all_classifications['Runtime Libraries'] = 'Unclassified';
      all_classifications['SAFECode'] = 'Unclassified';
      all_classifications['Test Suite'] = 'Unclassified';
      all_classifications['tools'] = 'Unclassified';
      all_classifications['Website'] = 'Unclassified';

  //-->
  </script>

<form name="changeform" id="changeform" method="post" action="process_bug.cgi">

  <input type="hidden" name="delta_ts" value="2012-12-14 10:24:19">
  <input type="hidden" name="longdesclength" value="3">
  <input type="hidden" name="id" value="12795">
  <input type="hidden" name="token" value="1355502673-69c1d2c4ee478cd2bed388d001f27b9e">
<div class="bz_alias_short_desc_container edit_form">
     <a href="show_bug.cgi?id=12795"><b>Bug 12795</b></a> -<span id="summary_alias_container" class="bz_default_hidden"> 
      <span id="short_desc_nonedit_display">Linking shared library fails on Win7 64-bit with x64_64-w64-mingw32-gcc-4.6.3</span>
     </span>
  
       
    <div id="summary_alias_input">
      <table id="summary">  
        
        <tr>
          <td>
            <label accesskey="s" for="short_desc"><u>S</u>ummary</label>:
          </td>
          <td>Linking shared library fails on Win7 64-bit with x64_64-w64-mingw32-gcc-4.6.3
          </td>
        </tr>
      </table>
    </div>
  </div>
  <script type="text/javascript">
    hideAliasAndSummary('Linking shared library fails on Win7 64-bit with x64_64-w64-mingw32-gcc-4.6.3', '');
  </script>
  <table class="edit_form">
    <tr>
      
      <td id="bz_show_bug_column_1" class="bz_show_bug_column">     
        <table>
          <tr>
    <td class="field_label">
      <b><a href="page.cgi?id=fields.html#status">Status</a></b>:
    </td>
    <td id="bz_field_status">
      <span id="static_bug_status">NEW
      </span>
    </td>
  </tr>
          <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
          <tr><th class="field_label "
    id="field_label_product">


  <a 
      title="Bugs are categorised into Products and Components."
      class="field_help_link"
      href="describecomponents.cgi"
  >Product:</a>

</th>
  <td class="field_value "
      id="field_container_product" >Build scripts</td>
    </tr>

    
    <tr class="bz_default_hidden"><th class="field_label "
    id="field_label_classification">


  <a 
      title="Bugs are categorised into Classifications, Products and Components. classifications is the top-level categorisation."
      class="field_help_link"
      href="page.cgi?id=fields.html#classification"
  >Classification:</a>

</th>
  <td class="field_value "
      id="field_container_classification" >Unclassified</td>
    </tr>
        
    
    
    <tr><th class="field_label "
    id="field_label_component">


  <a 
      title="Components are second-level categories; each belongs to a particular Product. Select a Product to narrow down this list."
      class="field_help_link"
      href="describecomponents.cgi?product=Build scripts"
  >Component:</a>

</th>
  <td class="field_value "
      id="field_container_component" >Makefiles</td>
    </tr>
    <tr>
      <td class="field_label">
        <label for="version"><b>Version</b></label>:
      </td>
<td>3.0
  </td>
    </tr>
        
    
        
    <tr>
      <td class="field_label">
        <label for="rep_platform" accesskey="h"><b>Platform</b></label>:
      </td>
      <td class="field_value">PC
       Windows NT
       <script type="text/javascript">
         assignToDefaultOnChange(['product', 'component']);
       </script>
      </td>
    </tr>
          <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
          
          <tr>
      <td class="field_label">
        <label for="priority" accesskey="i">
          <b><a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a></b></label>:
      </td>
      <td>P
       normal
      </td>
    </tr>            
          
          <tr>
      <td class="field_label">
        <b><a href="page.cgi?id=fields.html#assigned_to">Assigned To</a></b>:
      </td>
      <td><span class="vcard"><span class="fn">Unassigned LLVM Bugs</span>
</span>
      </td>
    </tr>
          <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
          <tr>
    <td class="field_label">
      <label for="bug_file_loc" accesskey="u"><b>
          <u>U</u>RL</b></label>:
    </td>
    <td>
      <span id="bz_url_input_area">
      </span>
    </td>
  </tr>
  
  
    <tr>
      <td class="field_label">
        <label for="keywords" accesskey="k">
          <b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
      </td>
      <td class="field_value" colspan="2">
      </td>
    </tr>
          <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
          
          <tr><th class="field_label">
    <label for="dependson">Depends on</label>:
  </th>
  <td>    
    <span id="dependson_input_area">
    </span>
    
  </td>
  </tr>
  
  <tr><th class="field_label">
    <label for="blocked" accesskey="b"><u>B</u>locks</label>:
  </th>
  <td>    
    <span id="blocked_input_area">
    </span>
    
  </td>
  
  <tr>
    <th> </th>
  
    <td colspan="2" align="left" id="show_dependency_tree_or_graph">
      Show dependency <a href="showdependencytree.cgi?id=12795&hide_resolved=1">tree</a>
  
        / <a href="showdependencygraph.cgi?id=12795">graph</a>
    </td>
  </tr>
          
        </table>
      </td>
      <td>
        <div class="bz_column_spacer"> </div>
      </td>
      
      <td id="bz_show_bug_column_2" class="bz_show_bug_column">
        <table cellpadding="3" cellspacing="1">
        <tr>
    <td class="field_label">
      <b>Reported</b>:
    </td>
    <td>2012-05-11 01:29 CDT by <span class="vcard">valtron2000
</span>
    </td>
  </tr>
  
  <tr>
    <td class="field_label">
      <b> Modified</b>:
    </td>
    <td>2012-12-14 10:24 CST 
      (<a href="show_activity.cgi?id=12795">History</a>)
    </td>
  
  </tr>
         <tr>
      <td class="field_label">
        <label for="newcc" accesskey="a"><b>CC List</b>:</label>
      </td>
      <td>4 
          users
          <span id="cc_edit_area_showhide_container" class="bz_default_hidden">
            (<a href="#" id="cc_edit_area_showhide">show</a>)
          </span>
        <div id="cc_edit_area">
          <br>
            <select id="cc" name="cc" multiple="multiple" size="5">
                <option value="geek4civic">geek4civic</option>
                <option value="kevin">kevin</option>
                <option value="llvmbugs">llvmbugs</option>
                <option value="moritzmaxeiner">moritzmaxeiner</option>
            </select>
        </div>
          <script type="text/javascript">
            hideEditableField( 'cc_edit_area_showhide_container', 
                               'cc_edit_area', 
                               'cc_edit_area_showhide', 
                               '', 
                               '');  
          </script>
      </td>
    </tr>
         <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
<tr><th class="field_label "
    id="field_label_see_also">


  <a 
      title="This allows you to refer to bugs in other installations. You can enter a URL to a bug in the 'Add Bug URLs' field to note that that bug is related to this one. You can enter multiple URLs at once by separating them with a comma. You should normally use this field to refer to bugs in other installations. For bugs in this installation, it is better to use the Depends on and Blocks fields."
      class="field_help_link"
      href="page.cgi?id=fields.html#see_also"
  >See Also:</a>

</th>
  <td class="field_value "
      id="field_container_see_also" ></td>
    </tr> 
         
         <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
         
                

        </table>
      </td>
    </tr>
    <tr>
      <td colspan="3">
          <hr id="bz_top_half_spacer">
      </td>
    </tr>
  </table>

  <table id="bz_big_form_parts" cellspacing="0" cellpadding="0"><tr>
  <td>

    
<script type="text/javascript">
<!--
function toggle_display(link) {
    var table = document.getElementById("attachment_table");
    // Store current height for scrolling later
    var originalHeight = table.offsetHeight;
    var rows = YAHOO.util.Dom.getElementsByClassName(
        'bz_tr_obsolete', 'tr', table);

    for (var i = 0; i < rows.length; i++) {
        bz_toggleClass(rows[i], 'bz_default_hidden');
    }

    if (YAHOO.util.Dom.hasClass(rows[0], 'bz_default_hidden')) {
        link.innerHTML = "Show Obsolete";
    }
    else {
        link.innerHTML = "Hide Obsolete";
    }

    var newHeight = table.offsetHeight;
    // This scrolling makes the window appear to not move at all.
    window.scrollBy(0, newHeight - originalHeight);

    return false;
}
//-->
</script>

<br>
<table id="attachment_table" cellspacing="0" cellpadding="4">
  <tr id="a0">
    <th colspan="2" align="left">
      Attachments
    </th>
  </tr>


      <tr id="a1" class="bz_contenttype_text_plain bz_patch bz_tr_obsolete bz_default_hidden">
        <td valign="top">
            <a href="attachment.cgi?id=9704"
               title="View the content of the attachment">
          <b><span class="bz_obsolete">Fixes this issue by incorporating using .a.o instead of .def into Makefile.rules for mingw64</span></b></a>

          <span class="bz_attach_extra_info">
              (623 bytes,
                patch)

            <br>
            <a href="#attach_9704"
               title="Go to the comment associated with the attachment">2012-12-14 09:06 CST</a>,
<span class="vcard"><span class="fn">Moritz Maxeiner</span>
</span>
          </span>
        </td>


        <td valign="top">
          <a href="attachment.cgi?id=9704&action=edit">Details</a>
            | <a href="attachment.cgi?id=9704&action=diff">Diff</a>
        </td>
      </tr>
      <tr id="a2" class="bz_contenttype_text_plain bz_patch">
        <td valign="top">
            <a href="attachment.cgi?id=9705"
               title="View the content of the attachment">
          <b>Use a.o instead of .def for main shared library only</b></a>

          <span class="bz_attach_extra_info">
              (714 bytes,
                patch)

            <br>
            <a href="#attach_9705"
               title="Go to the comment associated with the attachment">2012-12-14 10:24 CST</a>,
<span class="vcard"><span class="fn">Moritz Maxeiner</span>
</span>
          </span>
        </td>


        <td valign="top">
          <a href="attachment.cgi?id=9705&action=edit">Details</a>
            | <a href="attachment.cgi?id=9705&action=diff">Diff</a>
        </td>
      </tr>

  <tr class="bz_attach_footer">
    <td colspan="2">
        <span class="bz_attach_view_hide">
            <a href="#a0" onclick="return toggle_display(this);">Show
              Obsolete</a> (1)
        </span>
        <a href="attachment.cgi?bugid=12795&action=enter">Add an attachment</a>
        (proposed patch, testcase, etc.)
    </td>
  </tr>
</table>
<br>
<div id="add_comment" class="bz_section_additional_comments">
      <table>
        <tr>
          <td>
            <fieldset>
              <legend>Note</legend>
              You need to
              <a href="show_bug.cgi?id=12795&GoAheadAndLogIn=1">log in</a>
              before you can comment on or make changes to this bug.
            </fieldset>
          </td>
        </tr> 
      </table>
  </div>
  </td>
  <td>
  </td>
  </tr></table>

  
  <div id="comments"><script src="js/comments.js" type="text/javascript">
</script>







<!-- This auto-sizes the comments and positions the collapse/expand links 
     to the right. -->
<table class="bz_comment_table" cellpadding="0" cellspacing="0"><tr>
<td>
<div id="c0" class="bz_comment bz_first_comment">

      <div class="bz_first_comment_head">



        <span class="bz_comment_number">
          <a 
             href="show_bug.cgi?id=12795#c0">Description</a>
        </span>

        <span class="bz_comment_user"><span class="vcard">valtron2000
</span>
        </span>

        <span class="bz_comment_user_images">
        </span>

        <span class="bz_comment_time">
          2012-05-11 01:29:11 CDT
        </span>
      </div>



<pre class="bz_comment_text" >I did managed to get it working, though, and it seems to be a problem with a
makefile (or perhaps the autoconf).

How I ran configure:
sh ../llvm-3.0.src/configure --disable-pthreads --enable-shared
--enable-optimizations --enable-targets=host

I then ran make with no options. Everything goes OK until the final linking of
LLVM-3.0.dll:

llvm[1]: Linking Release Shared Library LLVM-3.0.dll
Cannot export Z10MakeErrMsgPSsRKSs: symbol not defined
Cannot export Z4FindIN4llvm15SubtargetInfoKVEEPKT_NS0_9StringRefES4_y: symbol
not defined
Cannot export Z4FindIN4llvm18SubtargetFeatureKVEEPKT_NS0_9StringRefES4_y:
symbol not defined
Cannot export
ZN4PBQP19HeuristicSolverImplINS_10Heuristics6BriggsEE7applyR2ESt14_List_iteratorINS_5Graph9NodeEntryEE:
symbol not defined
Cannot export ZN4llvm10AllocaInst12setAlignmentEj: symbol not defined
Cannot export
ZN4llvm10AllocaInstC1EPNS_4TypeEPNS_5ValueERKNS_5TwineEPNS_10BasicBlockE:
symbol not defined
Cannot export
ZN4llvm10AllocaInstC1EPNS_4TypeEPNS_5ValueERKNS_5TwineEPNS_11InstructionE:
symbol not defined
Cannot export
ZN4llvm10AllocaInstC1EPNS_4TypeEPNS_5ValueEjRKNS_5TwineEPNS_10BasicBlockE:
symbol not defined
Cannot export
ZN4llvm10AllocaInstC1EPNS_4TypeEPNS_5ValueEjRKNS_5TwineEPNS_11InstructionE:
symbol not defined
... (12693 of these errors in total, one for each export in LLVM-3.0.def) ...

The command it fails on is:

g++ -I/c/Users/mti/Desktop/llvm-3.0.src/include
-I/c/Users/mti/Desktop/llvm-3.0.src/tools/llvm-shlib -I/c/Users/mti/Desk
top/llvm-build/include -I/c/Users/mti/Desktop/llvm-build/tools/llvm-shlib 
-DNDEBUG -D__NO_CTYPE_INLINE -D_GNU_SOURCE -D
__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O2
-fomit-frame-pointer -fno-exceptions -fno-rtti -
Woverloaded-virtual -Wcast-qual  -O2
-L/c/Users/mti/Desktop/llvm-build/Release/lib
-L/c/Users/mti/Desktop/llvm-build/Rel
ease/lib     -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter
-Wwrite-strings   -shared /c/Users/mti/Desktop/llvm
-build/tools/llvm-shlib/Release/LLVM-3.0.def -o
/c/Users/mti/Desktop/llvm-build/Release/bin/LLVM-3.0.dll  \
            -lLLVMAnalysis -lLLVMArchive -lLLVMAsmParser -lLLVMAsmPrinter
-lLLVMBitReader -lLLVMBitWriter -lLLVMCodeGen
-lLLVMCore -lLLVMDebugInfo -lLLVMExecutionEngine -lLLVMInstCombine
-lLLVMInstrumentation -lLLVMInterpreter -lLLVMJIT -lL
LVMLinker -lLLVMMC -lLLVMMCDisassembler -lLLVMMCJIT -lLLVMMCParser -lLLVMObject
-lLLVMRuntimeDyld -lLLVMScalarOpts -lLLV
MSelectionDAG -lLLVMSupport -lLLVMTarget -lLLVMTransformUtils
-lLLVMX86AsmParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen -l
LLVMX86Desc -lLLVMX86Disassembler -lLLVMX86Info -lLLVMX86Utils -lLLVMipa
-lLLVMipo -lpsapi -limagehlp -lm

To fix it, I replaced "LLVM-3.0.def" in the above command with "LLVM-3.0.a.o",
and the DLL gets created. I haven't run the tests, but the DLL seems to work
(using it in a Java project, managed to compile and execute a simple file).</pre>
    </div>
  <div id="c1" class="bz_comment">

      <div class="bz_comment_head">



        <span class="bz_comment_number">
          <a 
             href="show_bug.cgi?id=12795#c1">Comment 1</a>
        </span>

        <span class="bz_comment_user"><span class="vcard"><span class="fn">Moritz Maxeiner</span>
</span>
        </span>

        <span class="bz_comment_user_images">
        </span>

        <span class="bz_comment_time">
          2012-12-14 09:06:04 CST
        </span>
      </div>



<pre class="bz_comment_text" >Created <span class="bz_obsolete"><a href="attachment.cgi?id=9704&action=diff" name="attach_9704" title="Fixes this issue by incorporating using .a.o instead of .def into Makefile.rules for mingw64">attachment 9704</a> <a href="attachment.cgi?id=9704&action=edit" title="Fixes this issue by incorporating using .a.o instead of .def into Makefile.rules for mingw64">[details]</a></span>
Fixes this issue by incorporating using .a.o instead of .def into
Makefile.rules for mingw64

Ran into this problem myself and found valtron2000's bug report and fix.
Incorporated this fix into the main Makefile.rules and put this into a patch.
I will also send this patch to llvm-commits shortly.

PS: This patch is done against current trunk (Revision 170207).</pre>
    </div>
  <div id="c2" class="bz_comment">

      <div class="bz_comment_head">



        <span class="bz_comment_number">
          <a 
             href="show_bug.cgi?id=12795#c2">Comment 2</a>
        </span>

        <span class="bz_comment_user"><span class="vcard"><span class="fn">Moritz Maxeiner</span>
</span>
        </span>

        <span class="bz_comment_user_images">
        </span>

        <span class="bz_comment_time">
          2012-12-14 10:24:19 CST
        </span>
      </div>



<pre class="bz_comment_text" >Created <span class=""><a href="attachment.cgi?id=9705&action=diff" name="attach_9705" title="Use a.o instead of .def for main shared library only">attachment 9705</a> <a href="attachment.cgi?id=9705&action=edit" title="Use a.o instead of .def for main shared library only">[details]</a></span>
Use a.o instead of .def for main shared library only

Previous patch made the user shared libs not compile.
Added another guard to change .def to .a.o only for the main dll</pre>
    </div>
  


  

</td>
<td>
</td>
</tr></table>
  </div>
        

</form>

<hr>
<ul class="related_actions">
    <li><a href="show_bug.cgi?format=multiple&id=12795">Format For Printing</a></li>
    <li> - <a href="show_bug.cgi?ctype=xml&id=12795">XML</a></li>
    <li> - <a href="enter_bug.cgi?cloned_bug_id=12795">Clone This Bug</a></li>
    
    <li> - <a href="#">Top of page </a></li>
    </ul>        


<div class="navigation">
  
  <i><font color="#777777">First</font></i>
  <i><font color="#777777">Last</font></i>
  <i><font color="#777777">Prev</font></i>
  <i><font color="#777777">Next</font></i>
    
  <i><font color="#777777">This bug is not in your last
    search results.</font></i>
</div>

<br>
</div>



<div id="footer">
  <div class="intro"></div>




<ul id="useful-links">
  <li id="links-actions"><ul class="links">
  <li><a href="./">Home</a></li>
  <li><span class="separator">| </span><a href="enter_bug.cgi">New</a></li>
  <li><span class="separator">| </span><a href="describecomponents.cgi">Browse</a></li>
  <li><span class="separator">| </span><a href="query.cgi">Search</a></li>

  <li class="form">
    <span class="separator">| </span>
    <form action="buglist.cgi" method="get"
        onsubmit="if (this.quicksearch.value == '')
                  { alert('Please enter one or more search terms first.');
                    return false; } return true;">
    <input class="txt" type="text" id="quicksearch_bottom" name="quicksearch" 
           value="">
    <input class="btn" type="submit" value="Search" 
           id="find_bottom"></form>
  <a href="page.cgi?id=quicksearch.html" title="Quicksearch Help">[?]</a></li>

  <li><span class="separator">| </span><a href="report.cgi">Reports</a></li>

  <li></li>

  <li>
        <span class="separator">| </span>
        <a href="docs/en/html/bug_page.html" target="_blank">Help</a>
      </li>
    
      <li id="new_account_container_bottom">
        <span class="separator">| </span>
        <a href="createaccount.cgi">New Account</a>
      </li>

    <li id="mini_login_container_bottom">
  <span class="separator">| </span>
  <a id="login_link_bottom" href="http://llvm.org/bugs/show_bug.cgi?id=12795&GoAheadAndLogIn=1"
     onclick="return show_mini_login_form('_bottom')">Log In</a>
  <form action="http://llvm.org/bugs/show_bug.cgi?id=12795" method="POST" 
        class="mini_login bz_default_hidden"
        id="mini_login_bottom"
        onsubmit="return check_mini_login_fields( '_bottom' );"
  >
    <input id="Bugzilla_login_bottom" 
           class="bz_login"
           name="Bugzilla_login"
           onfocus="mini_login_on_focus('_bottom')"
    >
    <input class="bz_password" 
           id="Bugzilla_password_bottom" 
           name="Bugzilla_password"
           type="password"
    >
    <input class="bz_password bz_default_hidden bz_mini_login_help" type="text" 
           id="Bugzilla_password_dummy_bottom" value="password"
           onfocus="mini_login_on_focus('_bottom')"
    >
    <input type="submit" name="GoAheadAndLogIn" value="Log in" 
            id="log_in_bottom">
    <script type="text/javascript">
      mini_login_constants = {
          "login" : "login",
          "warning" : "You must set the login and password before logging in."
      };
      
      if (YAHOO.env.ua.gecko || YAHOO.env.ua.ie || YAHOO.env.ua.opera) {
          YAHOO.util.Event.onDOMReady(function() {
              init_mini_login_form('_bottom');
          });
      }
      else {
          YAHOO.util.Event.on(window, 'load', function () {
              window.setTimeout(function() {
                  init_mini_login_form('_bottom');
              }, 200);
          });
    }
    </script>
    <a href="#" onclick="return hide_mini_login_form('_bottom')">[x]</a>
  </form>
</li>
<li id="forgot_container_bottom">
  <span class="separator">| </span>
  <a id="forgot_link_bottom" href="http://llvm.org/bugs/show_bug.cgi?id=12795&GoAheadAndLogIn=1#forgot"
     onclick="return show_forgot_form('_bottom')">Forgot Password</a>
  <form action="token.cgi" method="post" id="forgot_form_bottom"
        class="mini_forgot bz_default_hidden">
    <label>Login: <input type="text" name="loginname" size="20"></label>
    <input id="forgot_button_bottom" value="Reset Password" 
           type="submit">
    <input type="hidden" name="a" value="reqpw">
    <a href="#" onclick="return hide_forgot_form('_bottom')">[x]</a>
  </form>
</li>
</ul>
  </li>

  
    

  


  
</ul>

  <div class="outro"></div>
</div>


</body>
</html>