
John Femiani wrote:
It generated libraries like (the two dll.a are identical)
boost_regex-gcc34-mt-1_35.dll libboost_regex-gcc34-mt-1_35.dll.a libboost_regex-gcc34-mt.dll.a ...
I understood (is this right?) that dll's here are the shared libs and dll.a's are static libs, but why the extensions? Furthermore I can't link with these, not with -lboost... or -llibboost... or whatever. Could someone push me in the right direction? I was able to link with 1.33-r1 binaries installed from Cygwin's repo.
niko
You mean
g++ foo.cpp -lboost_regex-gcc34-mt-1_35
Doesn't work?
--John
Steven: If they're import libs, then where are my static libs? How should I compile Boost to get both? John: The weird thing is that it does _seemingly_ work. It compiles and links just as before, but linking gives out a warning of auto-importing libraries. This warning disappears with -Wl,--enable-auto-import, but the results remain the same and in any case auto-importing shouldn't be needed. The executable gets made but it never executes a single line, gives no errors and exits with value 53. The test case is below: #include <boost/program_options.hpp> #include <iostream> namespace po = boost::program_options; int main(int ac, char* av[]) { po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ; po::variables_map vm; po::store(po::parse_command_line(ac, av, desc), vm); po::notify(vm); if (vm.count("help")) { std::cout << desc << "\n"; return 1; } std::cout << "Success!" << std::endl; return 0; } Compiled/linked with: g++ -O2 -c -I/usr/local/include/boost-1_35 test.cpp g++ test.o -L/usr/local/lib -lboost_program_options-gcc34-mt-1_35 -o test niko