Re: [K3d-development] Quick & Easy Question About Splitting Code Up
Brought to you by:
barche
From: Timothy M. S. <ts...@k-...> - 2008-07-29 03:48:21
|
Alex Curtis wrote: > I'm starting to re-organise my code into separate files. Its starting to > get too cumbersome shoved into one file. > > I have split some of the components into a .h and .cpp. However I get a > crash (no feedback in terminal) when I use a .cpp and .h. But if I just > put the complete class code into just a .h and include it in the main > panel cpp. everything works fine. > To clarify on Carlos' suggestion - the current build system uses a file-globbing operation at configure-time to build the list of sources for a plugin. That's convenient because you don't have to explicitly list all the sources in your CMakeLists.txt. However, it means that new sources aren't "noticed" by the build until you re-run cmake. If you haven't done that, your plugin gets built, but hasn't been linked with any of the symbols in your new sources, which causes problems at runtime. Cheers, Tim -- Timothy M. Shead, K-3D founder http://www.k-3d.org |