I am trying to compile the complete example 8 provided at the end of this page: http://www.physics.wisc.edu/~craigm/idl/cmpfit.html
but I am getting this error: error: ‘memset’ was not declared in this scope
I have been looking how to solve this error and I saw that some people solved it by adding #include <string.h>
to the head of the code. I tried it but I am still getting the same error.
I am using gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) on Ubuntu 12.04 LTS
I am trying to compile with:
g++ -o example example.cpp -lmpfit -lm
g++ -g -Wall example.cpp -o example.o -lmpfit -lm
. Please show us how you are doingmemset
with the actual printout of the message.std::memset();
.