Is it possible to convert part of source code to library?
-
Hi All, im working on a dialog based application in vc6.0. My project consists of 15 files in which i need to convert 4 files in to a library. Is it really possible to convert only part of code in to a library, by keeping rest of the code as it is?? Or do i need to remove those 4 files and built them in to a separate work space as library and add it to the complete project? If I can do it, please give me the steps to do it.
Regards, Sunil Kumar
-
Hi All, im working on a dialog based application in vc6.0. My project consists of 15 files in which i need to convert 4 files in to a library. Is it really possible to convert only part of code in to a library, by keeping rest of the code as it is?? Or do i need to remove those 4 files and built them in to a separate work space as library and add it to the complete project? If I can do it, please give me the steps to do it.
Regards, Sunil Kumar
2 words : design, architecture given you've told us diddly squat about what your dialog app is doing, its a bit hard - but the answer could be 'yes' 15 files ? it really depends on the functionality - whats in the '4' files that makes them special ? If its a data processing/reformatting app for example, you may be able to seperate out the number crunching or string reformatting into a library/dll. You could even put your MFC stuff in an MFC Extension ... But likely you are going to need to do some 'refactoring' so
sunilkumar.d wrote:
Or do i need to remove those 4 files and built them in to a separate work space as library and add it to the complete project?
is also going to have to happen So, suggestions ... Isolate your functions ? in 4 files into a seperate project, build a dll build a test harness for the dll and test it then IN A COPY of your dialog app, graft in the dll test test test next time, think about the design a bit harder .. thats still going to be a bit of work, but if for example you will want to use those functions again/elsewhere, you've done the hard bits ... 'g'
-
2 words : design, architecture given you've told us diddly squat about what your dialog app is doing, its a bit hard - but the answer could be 'yes' 15 files ? it really depends on the functionality - whats in the '4' files that makes them special ? If its a data processing/reformatting app for example, you may be able to seperate out the number crunching or string reformatting into a library/dll. You could even put your MFC stuff in an MFC Extension ... But likely you are going to need to do some 'refactoring' so
sunilkumar.d wrote:
Or do i need to remove those 4 files and built them in to a separate work space as library and add it to the complete project?
is also going to have to happen So, suggestions ... Isolate your functions ? in 4 files into a seperate project, build a dll build a test harness for the dll and test it then IN A COPY of your dialog app, graft in the dll test test test next time, think about the design a bit harder .. thats still going to be a bit of work, but if for example you will want to use those functions again/elsewhere, you've done the hard bits ... 'g'
-
Hi All, im working on a dialog based application in vc6.0. My project consists of 15 files in which i need to convert 4 files in to a library. Is it really possible to convert only part of code in to a library, by keeping rest of the code as it is?? Or do i need to remove those 4 files and built them in to a separate work space as library and add it to the complete project? If I can do it, please give me the steps to do it.
Regards, Sunil Kumar
sunilkumar.d wrote:
My project consists of 15 files in which i need to convert 4 files in to a library.
That should be doable. So long as the files are in separate source files, you should be able to put them in a static library that you link into the application (it's not particularly different from just linking in the object files directly).
sunilkumar.d wrote:
Or do i need to remove those 4 files and built them in to a separate work space as library and add it to the complete project?
I'd remove those source files from the original project, add a new static library project to the solution and add the source files to that. Remember that you'll still need to ship the header files that declare the items defined in the source files.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p