Question about GLFW static library in Cocoa framework.

Using GLFW
2013-04-11
2013-04-12
  • 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.
    (./plugin.so is loaded in ./main command)

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

    But, following messages were generated in only Cocoa framework.

    [Class GLFWThread is implemented in both main and plugin.so. 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.