Skip to content

C++ Example: How to include an open-source library in your own C++ project

Hello

I am currently trying to implement the example where you should integrate an external open source library (Ne10) into the C++ project. My Eclipse runs on a Windows host.

Unfortunately, I always get an error message when executing step 2 after the following command:

build-Ne10.sh

Has anyone ever had the same error and can help me?

Kind Regards

Comments

  • It looks like CMake is trying to use nmake as the default generator, and it can't find nmake on your system.

    I googled the error message you saw, and this was one of the top hits:

    You could try the solution mentioned there, i.e. add -G "MinGW Makefiles" to the cmake command in the build script.

  • Hello Martin

    Thanks for your reply.

    The suggestion unfortunately didn't work. I had to add the "nmake.exe" to the enviroment path:

    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\

    In order to do that i first had to install Visual Studio Code since the "nmake.exe" is part of the VS.


    Unfortnuately after solving this error i had another one:

    (Link target) ->

       LINK : fatal error LNK1104: Datei "kernel32.lib" kann nicht geöffnet werde

    n. [C:\Users\vboxuser\eclipse-workspace\MyProject\build\axcf2152\external\Ne10\C

    MakeFiles\CMakeScratch\TryCompile-1nk6eb\cmTC_1c5e7.vcxproj]


        5 Warning(s)

        1 Error(s)

    The mentioned path in the error doesn't even exist.... CMakeScratch is just an empty folder.

    Is it normal to have so much trouble or is this example just a bit to ambitious for me?!?

    Kind regards

  • The example uses a Linux host to build NE10. The bash script is only an example, which might need to be modified, especially if you're using Windows. It might be possible to build NE10 on Windows, but we haven't tried it.

    The build instructions for NE10 don't mention Windows:

    In this case it is probably simpler to just switch to a Linux machine to build NE10 (e.g. a Linux virtual machine running on Windows). If you can get that working then at least that's a success you can build on.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.