c++ - Cygwin: Installing quantlib in cygwin -


i've attempted install quantlib-1.4 on cygwin along boost_1_55_0, following these steps: http://quantess.net/2012/09/26/quantlib-get-it-working-on-ubuntu/

after installation, i've ran quantlib's test cases no error detected:

xxx@xxx /usr/local/lib/quantlib-1.4/test-suite $ ./quantlib-test-suite.exe running 567 test cases...  tests completed in 15 m 20 s   *** no errors detected 

however when ran simple code (main.cpp):

#include <ql/quantlib.hpp>  int main(){     return 0; } 

linker errors seems occur.

xxx@xxx /usr/local/lib $ g++ -lquantlib main.cpp /tmp/ccvjpqgc.o:main.cpp:(.text$_znk8quantlib4dateplerkns_6periode[__znk8quantlib4dateplerkns_6periode]+0x2e): undefined reference `quantlib::date::advance(quantlib::date const&, int, quantlib::timeunit)' /tmp/ccvjpqgc.o:main.cpp:(.text$_zn8quantlib5errord1ev[__zn8quantlib5errord1ev]+0xd): undefined reference `vtable quantlib::error' /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: /tmp/ccvjpqgc.o: bad reloc address 0xd in section `.text$_zn8quantlib5errord1ev[__zn8quantlib5errord1ev]' collect2: error: ld returned 1 exit status 

i have tried add include_path , library_path windows's environment variables little difference. here? (i pretty new gcc & linux env... thanks)

sorry i'm late party.

it's quirk of gcc. command doesn't work, but

g++ main.cpp -lquantlib 

does instead (see, instance, why order in libraries linked cause errors in gcc? thourough explanation; in short, gcc scans arguments left right, , won't load quantlib if it's first argument because no other code requested of functionality yet).


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -