Debug vs Release in CMake

With CMake, it’s generally recommended to do an “out of source” build. Create your CMakeLists.txt in the root of your project. Then from the root of your project: And for Debug (again from the root of your project): Release / Debug will add the appropriate flags for your compiler. There are also RelWithDebInfo and MinSizeRel build configurations. You can modify/add to the flags by specifying a toolchain file in … Read more

Warning/error “function declaration isn’t a prototype”

In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing. I suggest that you use void consistently when you mean no arguments. If you have a variable a, extern int a; is a way to tell the compiler that a is a symbol that might be present in a … Read more

Categories c Tags ,

difference between and

The <malloc.h> header is deprecated (and quite Linux specific, on which it defines non-standard functions like mallinfo(3)). Use <stdlib.h> instead if you simply need malloc(3) and related standard functions (e.g. free, calloc, realloc ….). Notice that <stdlib.h> is defined by C89 (and later) standards, but not <malloc.h> Look into /usr/include/malloc.h you’ll find there some non-standard functions (e.g. malloc_stats(3), etc…) – in addition of malloc…. And gcc don’t link header files, but libraries. Read Levine’s book about linkers & loaders for more. … Read more

cannot declare variable ‘’ to be of abstract type ‘’

The reason the base class is abstract is this pure virtual function: The derived class DisablePairCollision attempts to define that function, but it does not do it correctly: As you can see, some of the arguments have different types. E.g. colObj0 is of type const btCollisionObject*, but it should be of type const btCollisionObjectWrapper*. Therefore, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)