GithubHelp home page GithubHelp logo

Comments (1)

sevstels avatar sevstels commented on June 27, 2024

Incorrectly made "nuklear.h" header!
It is impossible to compile C code in a C++ project. Because an array of errors occurs:

1>gui.obj : error LNK2019: unresolved external symbol nk_buffer_init_default referenced in function nk_glfw3_device_create
1>gui.obj : error LNK2019: unresolved external symbol nk__draw_next referenced in function nk_glfw3_render
1>gui.obj : error LNK2019: unresolved external symbol nk__draw_begin referenced in function nk_glfw3_render
1>gui.obj : error LNK2019: unresolved external symbol nk_convert referenced in function nk_glfw3_render
1>gui.obj : error LNK2019: unresolved external symbol nk_init_default referenced in function nk_glfw3_init
1>gui.obj : error LNK2019: unresolved external symbol nk_font_atlas_begin referenced in function nk_glfw3_font_stash_begin
1>gui.obj : error LNK2019: unresolved external symbol nk_font_atlas_init_default referenced in function nk_glfw3_font_stash_begin
1>gui.obj : error LNK2019: unresolved external symbol nk_font_atlas_end referenced in function nk_glfw3_font_stash_end
1>gui.obj : error LNK2019: unresolved external symbol nk_font_atlas_bake referenced in function nk_glfw3_font_stash_end
1>gui.obj : error LNK2019: unresolved external symbol nk_font_atlas_clear referenced in function nk_glfw3_shutdown
1>fatal error LNK1120: 10 unresolved externals

The compiler cannot build the application if you do not declare: extern "C" { #include "nuklear.h"}
But in this case other errors occur.
Because templates are included in the header and this is not a C language, but C++

nuklear.h(5595): error C2894: templates cannot be declared to have 'C' linkage
nuklear.h(5596): error C2894: templates cannot be declared to have 'C' linkage
nuklear.h(5597): error C2894: templates cannot be declared to have 'C' linkage
nuklear.h(5598): error C2894: templates cannot be declared to have 'C' linkage

The extern "C" directive does not allow to compile such a header. As a result, we have an unsolvable situation....

from nuklear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.