|
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.
|
|
|
|
|
ed welch wrote: You'd think that it wouldn't work, Why would you think that? And what do you do if you don't have the source code?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Richard MacCutchan wrote: And what do you do if you don't have the source code?
Do it the right way!
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
Richard MacCutchan wrote: if you don't have the source code
We come from a world where external library mostly had a different meaning.
Peter Wasser
Art is making something out of nothing and selling it.
Frank Zappa
|
|
|
|
|
well, if you don't have source code you can't build it easy way, or the hard way (duh)
|
|
|
|
|
Wow, I never thought of that.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
ed welch wrote: I'm building their code the "wrong" way 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.
It was broke, so I fixed it.
|
|
|
|
|
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.
Chris Meech
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]
|
|
|
|
|
Don't forget the mantra "Double, Double Toil and Trouble", while it's building.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|