Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: LETARTARE on November 07, 2019, 02:33:24 pm

Title: Order of the targets of a project
Post by: LETARTARE on November 07, 2019, 02:33:24 pm
Hello,
I searched the Wiki without success !

I have a project "project.cbp" (C++) with three targets "lib1", "lib2", "core".
The targets "lib1" and "lib2" provide shared libraries without dependencies, "core" provides the final GUI executable and uses the two previous libraries on which it depends (link dependencies here). It is assumed that the inclusion and link paths are correctly filled in.

During the first construction, how to impose on'C::B' the following construction order: 'lib1' then 'lib2' then 'core' ?

Thank you in advance.
Title: Re: Order of the targets of a project
Post by: Miguel Gimenez on November 07, 2019, 05:29:29 pm
Go to Project -> Properties -> Build targets. There you have a button labeled "Re-order..."; When you select the All virtual target the targets are built from top to bottom
Title: Re: Order of the targets of a project
Post by: LETARTARE on November 07, 2019, 06:28:00 pm
Good evening,
Thank you for your reply.

I did a test with three targets and a virtual 'All' => 'Log4qt', 'QSerial', 'QGLViewer' and the log is
Quote
-------------- Build: Log4qt in gcv-19.11-qt597-qgl271-win32-32 (compiler: GNU GCC Compiler 5.3.0 (qt59x))---------------

Target is up to date.
[100.0%] Running target post-build steps
cmd /C xcopy /D /Y lib\Log4qt.dll BuildCB\core_597\
lib\Log4qt.dll
1 fichier(s) copi‚(s)

-------------- Build: QGLViewer in gcv-19.11-qt597-qgl271-win32-32 (compiler: GNU GCC Compiler 5.3.0 (qt59x))---------------

Target is up to date.
[100.0%] Running target post-build steps
cmd /C xcopy /D /Y lib\QGLViewer.dll BuildCB\core_597\
lib\QGLViewer.dll
1 fichier(s) copi‚(s)

-------------- Build: QSerial in gcv-19.11-qt597-qgl271-win32-32 (compiler: GNU GCC Compiler 5.3.0 (qt59x))---------------

Target is up to date.
[100.0%] Running target post-build steps
cmd /C xcopy /D /Y lib\QSerial.dll BuildCB\core_597\
lib\QSerial.dll
1 fichier(s) copi‚(s)
Process terminated with status 0 (0 minute(s), 15 second(s))
0 error(s), 0 warning(s) (0 minute(s), 15 second(s))
It is noted that the order of execution is different from the virtual !
But perhaps hold is the use of the plugin 'QtPregen' to compile projects based on QT5,I will try to explore why.