The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I just figured out a way to build external c libraries a lot quicker. The problem is when library x uses library y, which in turn uses library z. For each library you have to create pointers to the include directories, pointers to the include lib directories, and the lib inputs and set the runtime setting for each of the projects, etc, etc,... which is actually quite a lot of work.
What I do is dump all the source code for all projects into one directory. Add all "c" files into an empty project, then build the bastard. You'd think that it wouldn't work, but it does. The people who write these libraries probably would get angry that I'm building their code the "wrong" way, but it saves me a sh*t load of time.
No matter how you arrange, format, comment, assemble the code someone is going to say it's wrong. But in most cases if it compiles without error, however you do it is just fine. As long as it is maintainable.
The main disadvantage of doing something like that is analogous to a brick and mortar library in that there needs to be some organization. Simply putting the books on a shelf and expecting everyone to know where they are can lead to problems and errors.
I’m not saying your method is bad, I’ve done similar in my embedded code where the libraries are few and easy to navigate. But in a large project I can see it leading to confusion.
Note that with you re-compiling the source code for the library, there may be compiler settings that are required by certain functions in order to use those functions properly. One of the reasons for segregating out the libraries in the first place was likely to use certain compiler settings. Think things like DEBUG, multi-thread, wide characters, etc. You have been fortunate not to have encountered bugs in using these libraries in this way.
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]