Frage

I'm using Code::Blocks and compiling with MinGW (under Windows, of course), and with the following code I get the error "undefined reference to distorm_decode32".

#include "distorm.h"
// ....
distorm_decode(/*...*/);

It seems like a linker error, right? So I went to (in CodeBlocks) Project > Build Options > Debug (and Release too) > Linker Settings > Link Libraries > Add > distorm

I have placed the distorm.lib file in (CodeBlocks dir)/MinGW/libs/distorm.lib, but it doesn't work.

Thanks in advance.

War es hilfreich?

Lösung

Solved!

Instead of this:

#include "distorm.h"

Use this:

#include <distorm.h>

Both distorm.h and distorm.lib must be placed in CodeBlocks\MinGW\headers and CodeBlocks\MinGW\libs.

Thanks.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top