Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #15669 > unrolled thread
| Started by | clusardi2k@aol.com |
|---|---|
| First post | 2012-06-27 10:59 -0700 |
| Last post | 2012-08-19 21:27 -0400 |
| Articles | 6 — 5 participants |
Back to article view | Back to comp.lang.java.programmer
On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans clusardi2k@aol.com - 2012-06-27 10:59 -0700
Re: On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-06-27 18:21 +0000
Re: On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans Arne Vajhøj <arne@vajhoej.dk> - 2012-06-27 22:11 -0400
Re: On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans bilsch <bilsch01@gmail.com> - 2012-07-07 03:16 -0700
Re: On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans Roedy Green <see_website@mindprod.com.invalid> - 2012-07-07 21:18 -0700
Re: On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans Arne Vajhøj <arne@vajhoej.dk> - 2012-08-19 21:27 -0400
| From | clusardi2k@aol.com |
|---|---|
| Date | 2012-06-27 10:59 -0700 |
| Subject | On Windows 7, How do you reference a "static library" (a dot lib) in NetBeans |
| Message-ID | <e90908a3-8178-4ee8-8cdb-4eed92391101@googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> |
|---|---|
| Date | 2012-06-27 18:21 +0000 |
| Message-ID | <slrnjumjpc.u9l.avl@gamma.logic.tuwien.ac.at> |
| In reply to | #15669 |
clusardi2k@aol.com <clusardi2k@aol.com> wrote: > I'm using Windows 7, NetBeans 7.1.2 and the C:\MinGW\bin\g++.exe compiler/linker. > 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. Have you tried passing the full pathname of the "dot lib" as argument to the g++ call without any extra options? (Just an idle guess on my side.) If it works, then be happy, otherwise be aware that g++ and "dot lib"s aren't really on topic here in a Java newsgroup.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-06-27 22:11 -0400 |
| Message-ID | <4febbd62$0$295$14726298@news.sunsite.dk> |
| In reply to | #15669 |
On 6/27/2012 1:59 PM, 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. g++ -L\foo -lbar z.cpp will look for \foo\libbar.a g++ z.cpp \foo\bar.lib should look for \foo\bar.lib Arne
[toc] | [prev] | [next] | [standalone]
| From | bilsch <bilsch01@gmail.com> |
|---|---|
| Date | 2012-07-07 03:16 -0700 |
| Message-ID | <jt92ab$jod$1@dont-email.me> |
| In reply to | #15669 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2012-07-07 21:18 -0700 |
| Message-ID | <hf2iv79eh44pj7kkpl7cn129o6mje31fp1@4ax.com> |
| In reply to | #15669 |
On Wed, 27 Jun 2012 10:59:26 -0700 (PDT), clusardi2k@aol.com wrote, quoted or indirectly quoted someone who said : > >My question is how do you reference a static library within NetBeans? You use JNI. You have to write some Java glue code. You put all your C/C++ in a DLL. You use System.load or System.loadlibrary see http://mindprod.com/jgloss/jni.html -- Roedy Green Canadian Mind Products http://mindprod.com Why do so many operating systems refuse to define a standard temporary file marking mechanism? It could be a reserved lead character such as the ~ or a reserved extension such as .tmp. It could be a file attribute bit. Because they refuse, there is no fool-proof way to scan a disk for orphaned temporary files and delete them. Further, you can't tell where the orhaned files ame from. This means the hard disks gradually fill up with garbage.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-08-19 21:27 -0400 |
| Message-ID | <5031928b$0$294$14726298@news.sunsite.dk> |
| In reply to | #15866 |
On 7/8/2012 12:18 AM, Roedy Green wrote: > On Wed, 27 Jun 2012 10:59:26 -0700 (PDT), clusardi2k@aol.com wrote, > quoted or indirectly quoted someone who said : > >> >> My question is how do you reference a static library within NetBeans? > > You use JNI. You have to write some Java glue code. You put all your > C/C++ in a DLL. You use System.load or System.loadlibrary Does that reference a static library in NetBeans?? :-) Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web