Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
El archivo C++ bgfx no se compilará en fedora 35

Estoy intentando crear una ventana morada con glfw y bgfx como punto de partida para el motor de mi juego, pero el archivo no se compila.

Estoy usando el compilador g ++ para ello. Acabo de aprender bgfx desde ayer y no sé qué hacer. La declaración del compilador es:

g++ aplicación.cpp -o src/app -lglfw3 -lGL -lX11 -lGLU

y mi codigo es

 #include <bgfx_engine/containers/include/bgfx/bgfx.h> #include <bgfx_engine/containers/include/bgfx/platform.h> #include <GLFW/glfw3.h> #define GLFW_EXPOSE_NATIVE_X11 #include <GLFW/glfw3native.h> #define WNDW_WIDTH 1600 #define WNDW_HEIGHT 900 int main(void) { bgfx::init(); glfwInit(); GLFWwindow* window = glfwCreateWindow(WNDW_WIDTH, WNDW_HEIGHT, "Hello, bgfx!",NULL ,NULL) bgfx::PlatformData pd; pd.ndt = glfwGetX11Display(); pd.nwh = (void*)glfwGetX11Window(window); bgfx::Init bgfxInit; bgfxInit.type = bgfx::RendererType::Count ;//auto choose a renderer bgfxInit.resolution.width = WNDW_WIDTH; bgfxInit.resolution.height = WNDW_HEIGHT; bgfxInit.resolution.reset = BGFX_RESET_VSYNC; bgfx::init(bgfxInit); bgfx::setViewClear(0,BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH,0x443355FF,1.0f,0); bgfx::setViewRect(0, 0, 0, WNDW_WIDTH, WNDW_HEIGHT); unsigned int counter = 0; while (true) { bgfx::frame(); counter++; } return 0; }

y me muestra el error:

 /usr/bin/ld: /tmp/ccQWzYSO.o: in function `main': app.cpp:(.text+0x16): undefined reference to `bgfx::Init::Init()' /usr/bin/ld: app.cpp:(.text+0x25): undefined reference to `bgfx::init(bgfx::Init const&)' /usr/bin/ld: app.cpp:(.text+0x5c): undefined reference to `bgfx::PlatformData::PlatformData()' /usr/bin/ld: app.cpp:(.text+0x8a): undefined reference to `bgfx::Init::Init()' /usr/bin/ld: app.cpp:(.text+0xc1): undefined reference to `bgfx::init(bgfx::Init const&)' /usr/bin/ld: app.cpp:(.text+0xe4): undefined reference to `bgfx::setViewClear(unsigned short, unsigned short, unsigned int, float, unsigned char)' /usr/bin/ld: app.cpp:(.text+0x103): undefined reference to `bgfx::setViewRect(unsigned short, unsigned short, unsigned short, unsigned short, unsigned short)' /usr/bin/ld: app.cpp:(.text+0x114): undefined reference to `bgfx::frame(bool)' collect2: error: ld returned 1 exit status

gracias

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!