Netbeans C ++ using MinGW and the libnoise library

Using netbeans 7.2 and the latest version of MinGW (using the installer), I cannot use the libnoise library. I am including header files correctly, autocompletion confirms this, however the library just doesn't work. File .lib and .dll. I tried every possible combination of adding them in the project> properties> Build> Linker, and also put the .dll in the base project directory. Despite this, I still get undefined help errors whenever I try to run the code. Does anyone know what to do?

+1
source share
2 answers

I know that you can link import library files (* .lib) with MinGW, but I still suggest recompiling libnoise.

With the current Makefile, this is not very easy and may break. Thus, I wrote a CMake script that works not only on Windows, but also works on all supported CMake platforms. In addition to this, I cleaned up the directory structure. The code itself was not affected, and when you create the library, it should essentially be the same as the current one.

libnoise on github

After creating your shared library, you will have the file libnoise.dll.a and libnoise.dll . Then you add libnoise.dll.a to the binding settings and place the DLL directly next to the binary or in the working directory.

+2
source

You need to link the lib file (= add it to the linker libraries) and put the dll in

 <project root>/dist/<...>/ 

(where is your exe located). You also do not need to add the DLL to the linker.

Can you send the error message you received?

0
source

Source: https://habr.com/ru/post/1444707/


All Articles