Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Mar 23, 2011
  1. @omf, OpenGL, Box, Image, Regex and Range on Windows/MinGW.

    omf committed
    a) When functions in a DLL are not declared/defined as dllexport, all the functions are automatically exported by gcc (dll.a)
    b) Functions auto-exported by gcc are exported using thunks in the dll.a file (function pointers from C.dll will differ in two different A and B dlls both loading C. dll)
    c) When AT LEAST one function in the dll is declared/defined as dllexport, ONLY that/those function/s will be exported
    d) Functions exported with dllexport won't use a thunk in the dll.a file (function pointers from C.dll will be the same in two different A and B dlls both loading C. dll).
    a) is not defining the Init function as dllexport for MinGW
    b) Box and Image addons are exporting some functions (ie: for the OpenGL addon to use them). Those addons are using dllexport/dllimport.
    c) So, loading Box and Image addons will fail ("Init function not found") due to 2.a + 2.b = 1.c
    To fix this situation (try 1):
    d) If we remove the dllexport/dllimport modifiers in Box and Image addons, all the functions will be exported, including their Init function (see 2.a and 1.a)
    e) Box and Image addons won't fail to load.
    f) But OpenGL addon will fail to load ("missing protos") due to 2.d and then 1.b.
    To fix this situation (try 2 OK):
    g) Don't remove the dllexport/dllimport modifiers from Box and Image addons
    h) Apply dllexport to the Init function in, so we will have 1.c and 1.d in ALL the addons.
    i) Now, addons won't fail to find their Init function (1.c) and won't have 2.f anymore (1.d)
    j) But now, due to 1.c, building Regex addon will fail because it depends on Range addon wich is not explicitly exporting functions.
    k) We have to create an IoRangeApi.h (ala Box e Image), then apply the IORANGE_API modifier to the functions being imported by Regex at least, and add a BUILDING_RANGE_ADDON definition to the Range CMakeLists.txt file.
    Now, OpenGL, Box, Image, Regex and Range will build and load correctly.
Commits on May 7, 2010
  1. @jeremytregunna
  2. @jeremytregunna

    Added to addons dir. This script will be used to generate…

    jeremytregunna committed
    … the IoFooInit.c files for the Foo addon (substitute Foo with an actual addon name). Code largely taken from
Something went wrong with that request. Please try again.