News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

project compile many files (wizard)

Started by japina, August 13, 2016, 10:10:32 AM

Previous topic - Next topic

japina

Working on the plugin for my ARM based boards I need plugin to compile many files (well, three for starts).
How to do it in plugin?
I managed to add additional files to the project with:

    file = project.AddFile(target, libs_path + _T("/startup_stm32f030xc.s"), true, true, 50);
    file.AddBuildTarget(target);
    file.compile = true;
    file.link = true;

    file = project.AddFile(target, libs_path + _T("/system_stm32f0xx.c"), true, true, 50);
    file.AddBuildTarget(target);
    file.compile = true;
    file.link = true;
 

and the files are added, but when clicking on compile only the user created file gets compiled.
What about others?

stahta01

Do you know the difference between a CB plugin and CB Wizard?

Because your question makes no sense about a CB plugin; but, it does about a CB Wizard.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

japina

 :( Messed up again ... working on wizard and I constantly say it's plugin. Sorry.

Moving the topic.

stahta01

Are the files all supposed to be under different or the same build targets?

If the same, then add them to the same target.

If different, the you need to add a Virtual target to the project.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

japina

Used console wizard as a template and solved this problem.

The question is - how to reverse the order of the files being linked?
It looks like this is the culprit for program not to work :/

oBFusCATed

If you explain what is the real problem someone might be able to help you.

If you adjust the weight of each file it will affect the compiling order (not sure about linking order).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]