0

It look like Visual studio has a solution #define LOG4CXX_STATIC. How about eclipse in Linux?

This is the follow up question of my last question

Community
  • 1
  • 1
Bryan Fok
  • 3,277
  • 2
  • 31
  • 59
  • The define tells the dumb windows compiler that you are intending to link the library statically. Because on Windows compilers care. On Linux they don't, only linkers do. If you than try to link it dynamically, it will fail, but it will not force static linking. It also does not affect whether APR will be linked statically or dynamically at all. – Jan Hudec Apr 22 '13 at 11:48
  • @Jan thanks for your reply, but i am a linux newbie. could you through an example? – Bryan Fok Apr 22 '13 at 11:52
  • I've said nothing about Linux. I've only said that the "solution" you quote for Windows is not a solution to anything at all! – Jan Hudec Apr 22 '13 at 11:53
  • You'll have to either get a pre-compiled static lib, or compile it yourself (there are instructions on the log4cxx website). Then you can link it using the -l option to gcc/g++ – krsteeve Apr 23 '13 at 17:34

0 Answers0