From: Han Hu <hh....@gm...> - 2012-02-14 21:20:24
|
Thanks a lot. I just noticed that the boost lib files were located in the folder "ext" instead of folder “libraries“. I manually specified all related boost and zlib lib files in Linker>>Input>>Additional Dependencies and the test program works now! I haven't touched the preprocessor part. Han On Tue, Feb 14, 2012 at 3:47 PM, Matthew Chambers <mat...@gm... > wrote: > Ah, boost uses auto-link by default for MSVC (pragma statements in the > header files that point to a specific library filename scheme). We use a > slightly different scheme so it doesn't match up. You need to turn off > auto-link in the preprocessor by defining BOOST_ALL_NO_LIB=1. You'd put > that in your project file for MSVC or Makefile for autotools. Then you > specify the links to the boost libraries manually. > > There's probably a way to get pwiz to use the system-naming scheme so > there wouldn't be this incompatibility with auto-link, but I haven't > investigated how to do that. > > -Matt > > > > On 2/14/2012 2:15 PM, Han Hu wrote: > >> Thanks for the information, Matt. >> >> I do see the lib/dll files for each module. I tried to compile the >> example file hello_pwiz.cpp with >> VS2008 (I specified libpwiz_data_msdata.lib), but got hundreds of linkage >> error. >> >> I am not familiar with .NET, so I just link them separately. >> >> One of them are like >> "Error 1 error LNK2001: unresolved external symbol "class >> boost::system::error_category const >> & __cdecl boost::system::get_system_**category(void)" >> (?get_system_category@system@**boost@@YAABVerror_category@12@**XZ) >> c:\Users\Han\Documents\Visual >> Studio 2008\Projects\gag_test\gag_**test\libpwiz_data_msdata.lib 1 >> gag_test" >> >> I think I might have to import boost .lib files, like >> libboost_system-vc90-mt.lib, then get an error >> "fatal error LNK1104:cannot open file 'libboost_system-vc90-mt-1_43.**lib' >> " >> >> But I don't see the libboost_system-vc90-mt-1_43.**lib file. Did I go to >> the wrong way? >> >> Han >> >> On Tue, Feb 14, 2012 at 2:16 PM, Matthew Chambers < >> mat...@gm... >> <mailto:matt.chambers42@gmail.**com <mat...@gm...>>> wrote: >> >> Hi Han, >> >> There is a 'libraries' target you can specify with quickbuild.bat. But >> it doesn't build a >> monolithic library, it builds a separate lib/dll for each module, like >> msdata, identdata, >> utility, etc. You'd need to link to each of these libraries either >> dynamically or statically in >> order to use pwiz from another native project. If you're able to use >> .NET on Windows then you >> can simply use the .NET bindings which is a single monolithic DLL >> (there is no way to do modular >> template-heavy code). >> >> Hope this helps, >> -Matt >> >> >> >> On 2/14/2012 12:36 PM, Han Hu wrote: >> >> Hi >> >> I am looking for a convenient way to take proteowizard as an >> external library (use >> .lib/.dll/.h) and >> call the classes/functions from external program (not based on >> Boost.Bjam). Does anyone know >> how to >> do that? >> >> Thanks a lot! >> >> Han >> > -- Han Hu Ph.D Candidate in Bioinformatics Program, Boston University Phone: 617-817-5172 Email: hh...@bu... |