Re: The Big Project I was working on

new topic     » goto parent     » topic index » view thread      » older message » newer message
Icy_Viking said...

Keep in mind that FLTK is a CPlusPlus library. This is a C port of the library. So everything that was put into classes is now handled as a separate function. If that makes sense. Granted when I viewed the exported DLL functions, I noticed not everything in there needs to be wrapped. So its probably less than 9k, but it is still a ton.

There are 73 classes defined using the WIDGET_DECLARE macro in include/cfl_widget.h which itself declares 74 functions per widget, so that's at least 5,402 functions, plus whatever else is declared manually.

I usually search shared libraries using nm -D (for dynamic symbols) and then filter with grep " T " (for text-only symbols). In this case you'll want to exclude all of the C++ exports which are name-mangled with _Z... and just look for the Fl_... functions. Running this filter: nm -D bin/libcfltk.so.1.0.16 | grep -c " T Fl_" I get 7,805 functions. Oof.

Also, if you're looking to build a shared library for CFLTK, the author recently posted the full cmake command here: https://github.com/MoAlyousef/cfltk/issues/184#issuecomment-812943830

cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_SYSTEM_LIBPNG=OFF -DOPTION_USE_SYSTEM_LIBJPEG=OFF -DOPTION_USE_SYSTEM_ZLIB=OFF -DOPTION_USE_GL=OFF -DFLTK_BUILD_EXAMPLES=OFF -DFLTK_BUILD_TEST=OFF -DOPTION_USE_THREADS=ON -DOPTION_LARGE_FILE=ON -DOPTION_BUILD_HTML_DOCUMENTATION=OFF -DOPTION_BUILD_PDF_DOCUMENTATION=OFF -DCFLTK_BUILD_SHARED=ON -DCFLTK_LINK_IMAGES=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DOPTION_BUILD_SHARED_LIBS=ON 

Since most of this is generated using macros, you should be able to create a wrapper script that does most of the work. I can help with this if you'd like. I've recently been fiddling with the one I made for IUP but then I was reminded if how I don't really like IUP.

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu