Code::Blocks Forums
User forums => Help => Topic started by: visir on October 14, 2017, 07:09:19 am
-
Hello. I need to compile this https://mediaarea.net/en/MediaInfo . Download source from here https://mediaarea.net/en/MediaInfo/Download/Source , "Source code, All included, GUI/CLI".
My question is: it needs a lot (8) of libraries, for example a tinyxml2 library, which is just two files. Should I create an extra project for every library? How to set up dependencies, so that cb builds all subprojects in correct order? How to set up paths for included files and object files?
-
The solution/projects system is an attempt at 'modules' somehow. Instead of compiling your dependancies and linking to their static library, you put everything in a single solution (including your libs) and then mark them as dependancies.
https://www.reddit.com/r/cpp/comments/4r8n41/what_are_some_reasons_why_visual_studio_seems_so/
Hmm. there was a MediaInfo.workspace file, but I ignored it. Maybe that's it. First time seeing one...
EDIT: Nope, no dependency info there. Can as well just open every .cbp file manually.
Maybe I should just add those files into project, they will compile as one bunch then.
-
FYI: The CB Projects are 10 years old! on https://github.com/MediaArea/MediaInfo/tree/master/Project (https://github.com/MediaArea/MediaInfo/tree/master/Project)
And, at least 2 CB Projects are custom makefile projects instead or normal CB Projects.
Edit2: And, the makfile appears to be missing for the cb "custom makefile" projects.
Edit3: At least, https://github.com/MediaArea/MediaInfoLib/tree/master/Project/CodeBlocks (https://github.com/MediaArea/MediaInfoLib/tree/master/Project/CodeBlocks) is only 9 years old.
Tim S.
-
Building programs is my weak point in general, it just never works. Especially because I'm on windows, and I try to build crossplatform programs without visual studio.
Does it worth trying to update cb projects? How to organize dependencies with cb?
Github issues with label "help wanted" are hilariously related: https://github.com/MediaArea/MediaInfo/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22
-
I would use a separate CB Project for the mediainfo and libmediainfo.
I would use a normal CB Project for mediainfo
And, a custom makefile cb project for libmediainfo.
The reason to use makefile cb project for libmediainfo is because there is a CMake folder for the library.
I would work on building libmediainfo first.
CMake can be used to create a custom makefile cb project.
I would try converting one of the Visual Studio projects into a normal CB project using the import tool for mediainfo project.
I use external dependency option in CB for dependency management; I have never had good results from using CB Workspace/project dependency.
Edit: If you are trying to cross compile this project; I would not try doing that myself; it is not easy to cross compile any project that was created without cross compile support!
Tim S.
-
Building programs is my weak point in general, it just never works. Especially because I'm on windows, and I try to build crossplatform programs without visual studio.
This is a multi-platform program; to call it a crossplatform program is misleading and implies you want to do crossplatform build.
crossplatform builds is beyond me; mainly because it is easier to build Windows programs on Windows and harder to build Windows programs under Linux (So, I never tried to learn it).
Tim S.