Question about GLFW static library in Cocoa framework.

Using GLFW
  • Keiichiro Oura

    Keiichiro Oura - 2013-04-11

    I use GLFW-2.7.8 in X11, Windows, and Mac OS.
    Following code work fine in x11, win32, Carbon framework.
    (./ is loaded in ./main command)

    % gcc -o ./main ./main.c GLFW.a
    % gcc -o ./ ./plugin.c GLFW.a -dynamiclink
    % ./main ./

    But, following messages were generated in only Cocoa framework.

    [Class GLFWThread is implemented in both main and One of the two will be used.]

    Is it bug?

  • Camilla Löwy

    Camilla Löwy - 2013-04-11

    Don't put GLFW into both binaries.

  • Keiichiro Oura

    Keiichiro Oura - 2013-04-12

    Thank you for your answer.

    I fixed this problem.
    Two files(cocoa_init.m and cocoa_window.m) were compiled for each binary by changing class name.