Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: japina on August 13, 2016, 10:10:32 am

Title: project compile many files (wizard)
Post by: japina on August 13, 2016, 10:10:32 am
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:

Code
    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?
Title: Re: project compile many files
Post by: stahta01 on August 13, 2016, 01:51:01 pm
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.
Title: Re: project compile many files
Post by: japina on August 13, 2016, 01:54:53 pm
 :( Messed up again ... working on wizard and I constantly say it's plugin. Sorry.

Moving the topic.
Title: Re: project compile many files (wizard)
Post by: stahta01 on August 14, 2016, 12:23:34 am
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.
Title: Re: project compile many files (wizard)
Post by: japina on August 14, 2016, 11:30:28 pm
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 :/
Title: Re: project compile many files (wizard)
Post by: oBFusCATed on August 14, 2016, 11:58:54 pm
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).