<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Error: undefined reference to &#x27;_imp___ZN8BamTools9BamReaderC1Ev&#x27;, when using BamTools library:]]></title><description><![CDATA[<p dir="auto">I want to use the BamTools API in my qt project. I am using Qt5.2 on Windows 7.</p>
<p dir="auto">I downloaded and made the BamTools library following the instructions at <a href="https://github.com/pezmaster31/bamtools/wiki/Building-and-installing" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/pezmaster31/bamtools/wiki/Building-and-installing</a></p>
<p dir="auto">In the BamTools/lib directory i have the files: "libbamtools-utils.a"; "libjsoncpp.a"; "libbamtools.a";<br />
"libbamtools.dll"; and "libbamtools.dll.a".</p>
<p dir="auto">In my .pro file i have the following:<br />
@<br />
LIBS += -L$$PWD/../../BamTools/lib/ -llibbamtools</p>
<p dir="auto">INCLUDEPATH += $$PWD/../../BamTools/include<br />
DEPENDPATH += $$PWD/../../BamTools/include<br />
@</p>
<p dir="auto">When I try to create a BamReader object in one of my .cpp files, i get the error:  undefined reference to '_ imp___ZN8BamTools9BamReaderC1Ev'.</p>
<p dir="auto">I have no idea how to fix this sort of error and have been searching the internet for something but cant find anything relavant. This is the first time I have tried to use a library in a Qt project, so I'm not sure if I'm doing that wrong or there's something wrong with the library I made. Any help would be much appreciated.</p>
]]></description><link>https://forum.qt.io/topic/41565/error-undefined-reference-to-_imp___zn8bamtools9bamreaderc1ev-when-using-bamtools-library</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 15:33:56 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/41565.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 May 2014 05:35:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Error: undefined reference to &#x27;_imp___ZN8BamTools9BamReaderC1Ev&#x27;, when using BamTools library: on Tue, 20 May 2014 03:28:32 GMT]]></title><description><![CDATA[<p dir="auto">I don't think this error is related to Qt.</p>
<p dir="auto">The undefined symbol _ imp___ZN8BamTools9BamReaderC1E is a C++ mangled name for  BamTools::BamReader::BamReader()</p>
<p dir="auto">Check if you build library correctly.<br />
If you have an utility nm with MinGW then you can use it<br />
@<br />
nm -C libbamtools.so|grep BamReader<br />
@</p>
<p dir="auto">Create a simple example that uses bamtool without Qt and try to build it with the libbamtools. It may help to investigate the problem.</p>
<p dir="auto">Another idea, don't mix libraries build with MinGW and VS.<br />
Use only one tool for all your libs and apps.</p>
]]></description><link>https://forum.qt.io/post/229109</link><guid isPermaLink="true">https://forum.qt.io/post/229109</guid><dc:creator><![CDATA[andreyc]]></dc:creator><pubDate>Tue, 20 May 2014 03:28:32 GMT</pubDate></item><item><title><![CDATA[Reply to Error: undefined reference to &#x27;_imp___ZN8BamTools9BamReaderC1Ev&#x27;, when using BamTools library: on Tue, 20 May 2014 00:28:13 GMT]]></title><description><![CDATA[<p dir="auto">andreyc, I still get the same error when I use '-lbamtools'.</p>
<p dir="auto">Good question about which compiler, actually I tried both MinGW and VS and I get the same error with both.</p>
]]></description><link>https://forum.qt.io/post/229102</link><guid isPermaLink="true">https://forum.qt.io/post/229102</guid><dc:creator><![CDATA[edtasker]]></dc:creator><pubDate>Tue, 20 May 2014 00:28:13 GMT</pubDate></item><item><title><![CDATA[Reply to Error: undefined reference to &#x27;_imp___ZN8BamTools9BamReaderC1Ev&#x27;, when using BamTools library: on Mon, 19 May 2014 21:50:53 GMT]]></title><description><![CDATA[<p dir="auto">What compiler do you use? VisualStudio or MinGW.</p>
<p dir="auto">I'm not sure about VS, for MinGW I think it should be<br />
@<br />
LIBS += -L$$PWD/../../BamTools/lib/ -lbamtools<br />
@</p>
<p dir="auto">Note <em>-lbamtools</em> without lib.</p>
]]></description><link>https://forum.qt.io/post/229088</link><guid isPermaLink="true">https://forum.qt.io/post/229088</guid><dc:creator><![CDATA[andreyc]]></dc:creator><pubDate>Mon, 19 May 2014 21:50:53 GMT</pubDate></item></channel></rss>