Author Topic: project compile many files (wizard)  (Read 1740 times)

Offline japina

  • Multiple posting newcomer
  • *
  • Posts: 11
project compile many files (wizard)
« 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?
« Last Edit: August 13, 2016, 02:28:22 pm by japina »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7067
    • My Best Post
Re: project compile many files
« Reply #1 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline japina

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: project compile many files
« Reply #2 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7067
    • My Best Post
Re: project compile many files (wizard)
« Reply #3 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline japina

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: project compile many files (wizard)
« Reply #4 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 :/

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13149
    • Travis build status
Re: project compile many files (wizard)
« Reply #5 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).
(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!]