I downloaded the newest (1.3.1) version and tried to compile in on Windows 2000 using MinGW and MSYS. It worked fine for commonCpp 1.2.7, but now I get errors.
I just downloaded it, unzipped and untared it.
Then, in MinGW, in the commoncpp2-1.3.1 directory, I ran configure with no options. That completed fine. Then I ran make, which compiled for a while, but then I got this error:
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY -D_GNU_SOURCE -I../w32 -g -O2 -c -o file.lo `test -f file.cpp || echo './'`file.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY -D_GNU_SOURCE -I../w32 -g -O2 -c file.cpp -MT file.lo -MD -MP -MF .deps/file.TPlo -DDLL_EXPORT -DPIC -o .libs/file.o
file.cpp: In function `time_t ost::lastAccessed(const char*)':
file.cpp:1453: `SECS_BETWEEN_EPOCHS' undeclared (first use this function)
file.cpp:1453: (Each undeclared identifier is reported only once for each
function it appears in.)
file.cpp:1453: `SECS_TO_100NS' undeclared (first use this function)
make: *** [file.lo] Error 1
make: Leaving directory `/c/temp/commonCpp-1.3.1/commoncpp2-1.3.1/src'
make: *** [all-recursive] Error 1
It's like it totally missed the w32/c++/config.h file.
What's the best way to correct this?
I really want to contribute some code to allow raw UDP sockets, but build errors are killing me. (When I started this with 1.2.7 I didn't have this many build problems.) BTW, I was not using my new code on this build. It was a fresh download.
I also get that error on XP using mingw. I tried including the w32/cc++/config.h in include/cc++/config.h as well as replacing the include/cc++/config.h and neither worked. The second actually caused MORE problems.
I just copied those two lines out of w32/cc++/config.h into file.cpp and all went well.
Log in to post a comment.