Hello to all,
I try to compile qcad but the first part stops with error:
src/dl_writer.h: In member function ‘void DL_Writer::entityAttributes(const DL_Attributes&) const’:
src/dl_writer.h:337: error: ‘strcasecmp’ was not declared in this scope
src/dl_writer_ascii.cpp: In member function ‘virtual void DL_WriterA::dxfReal(int, double) const’:
src/dl_writer_ascii.cpp:72: error: ‘strlen’ was not declared in this scope
src/dl_writer_ascii.cpp:81: error: ‘strlen’ was not declared in this scope
src/dl_writer_ascii.cpp: In static member function ‘static void DL_WriterA::strReplace(char*, char, char)’:
src/dl_writer_ascii.cpp:147: error: ‘strlen’ was not declared in this scope
make: *** [src/dl_writer_ascii.o] Fehler 1
Building libdxf.a failed
I read the other thread in this forum, but on my opensuse 11.1 system there is no compat…
Then copy the .so somewhere in your system path (I put mine in /usr/lib). Then run a “make clean” so that the libdxflib.a in the /dxflib-2.2.0.0-1.src/lib folder is removed(or manually delete it). This will ensure that when you make the test program that it uses the shared library rather than the static one.
Go to the test folder and run:
make
./test demo.dxf
I did this on a Kubuntu Jaunty 9.04 x86_64 box and it worked just fine for dxflib 2.2.0.0. I posted how to make a shared library, because apparently the documentation on dxflib is somewhat outdated(2.0.x.x) and “make shared” does not work as it says it will.
I had the same issue using gcc-4.3 on debian. Nevertheless, if you add the library string.h everything works fine for me - including the test program. I think this is a better solution than installing a different compiler… correct me if I’m wrong!