Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: bilsch Newsgroups: comp.lang.java.programmer Subject: Re: On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans Date: Sat, 07 Jul 2012 03:16:44 -0700 Organization: A noiseless patient Spider Lines: 16 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 7 Jul 2012 10:16:44 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="SCMsXqyEgNCKlTC+UnaBHg"; logging-data="20237"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+M3/N2uSDyqyEnMzGe8Y21" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Cancel-Lock: sha1:KpCF2skA6/e4raGp4gjFwThMVs4= Xref: csiph.com comp.lang.java.programmer:15857 On 6/27/2012 10:59 AM, clusardi2k@aol.com wrote: > I'm using Windows 7, NetBeans 7.1.2 and the C:\MinGW\bin\g++.exe compiler/linker. > > I have been trying to reference a static library (file.lib) using linker options such as "-l" and "-L". All attempts have been unsuccessful (one possible reason is) because the "-l" option only takes the name of the library (without a leading "lib" in the filename and no suffix) and probably not a path to the library file. The "L" option takes a path to the folder containing the library, but it does not work for me. > > http://mingw.org/wiki/LibraryPathHOWTO > > My question is how do you reference a static library within NetBeans? > > You can modify the project's linking options by right clicking on the project and selecting properties. From there, you can specify a library folder, a specific library file, or you can enter a specific linker option such as "-lfile". > > I have tried various ways to get my project to use the dot lib without success. When I build the project, I get a lot of undefined references. > > Thanks Sorry, I don''t know.