On 23 August 2011 08:45, Ina J. wrote:
> Found the problem! It was in my compile options.
> My makefile's compile section looked like this:
> #Compiler options
> CCFLAGS=-std=c++98 -Wall -pedantic -Wextra -g -D_GLIBCXX_DEBUG -pthread
> #MySQL libs
> MYSQL_INC = -I/usr/include/mysql -I/usr/include/mysql++
> MYSQL_LIB = -Bsymbolic-functions -rdynamic -L/usr/lib/mysql++ -lmysqlclient
> My makefile had an error in it and it didn't use the CCFLAGS at all at the
> beginning of the project. I corrected it during the project and then the
> problem occured. When I realized this, I started to cut down the options and
> found the 'D_GLIBCXX_DEBUG' will trigger the valgrind. I removed it from my
> makefile and everything works as it should now.
> Why does this option cause that kind of a problem?? Can't even remember
> where I found the option and why did I add it after all.
It turns on the libstdc++ debug mode, but you have to use it
consistently for everything, you can't generally mix objects built
with it and objects built without it.