Re-use lots of c++ files in several (closely related) projects without libs and without manually adding files to the project every time. Possible?

I have a plethora of .h/.cpp files with various classes. From files with tools to files with classes for every type of ‘problem’ the project needs to handle. This is an ever growing list.

I also have several projects that rely on large parts of the same code (shared folder), and still have quite unique features and approaches to problems.

Many many years ago, using a very old version of the c++ Builder IDE, I organized all these files (both .h and .cpp) in special ‘container’ .h/.cpp files that only linked to them (#include). For instance GUITools.h/.cpp links to a bunch of files, EngineTools.h/.cpp, links to a bunch of files and so forth (you get what I mean).

Latter files were then the only files I added to the projects. So GUIools.obj, EngineTools.obj etc would be built.

This meant I could easily create a new set of files/classes for a new ‘problem’ and simply add those (#include) to one .h/.cpp file set and build with this change/addition in all projects.

Making, Building, debugging, tracing into etc. all worked very smoothly in every project and I could easily work on any project and make improvements / fixes in shared code when necessary.

Things worked nicely for a long time, so it was not on the list of things to change or improve on. PS. I also stuck with a particular version of the IDE for a long time.

I now use recent iterations of the IDE / toolset and keep up to date. Contrary to expectations, coding is less fun these days. I find myself Building rather than Making because the IDE / toolset can’t figure out which is which. Showing the contents of variables during debugging often fails because the debugger can’t figure out the variables type. Fancy features like underlining errors don’t work properly, searching issues etc.

The projects build nicely and work stable as ever, but working on them is way less fun these days.

So, I have to change my ways and before I start and overhaul I need to understand what is possible and what is not and I’m also curious if other people have similar approaches or not at all.

I was hoping there is a way to replace those 5/6 ‘container’ aka added-to-each-project .h/.cpp files with other type files that have the same effect but which tell the IDE the files in them are part of the project (so that they are all built in their own obj files etc.). Make would then be lightning fast again (and work, I hope) Or a pragma of sorts ? I really don’t know.

If the prevailing wisdom will be to simply add the individual files to the project(s) each time then that is what I will do (and I will organize myself that way).

I just wonder if there is not a better way to share the code (an not use libs because that’s even more projects and means switching between projects to add/fix something in the libs etc)

Your constructive thoughts appreciated.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật