Author Topic: $link_objects build order  (Read 4337 times)

Offline Vikingo

  • Single posting newcomer
  • *
  • Posts: 7
$link_objects build order
« on: February 18, 2014, 01:34:24 am »
Hi, I have a project (main.c) which depends on other source files (bla.c blabla.c, etc). I'm using SDCC compiler

Everything builds ok but the link command passes my main.rel as the last object to link when the compiler asks for it to be the first parameter.

How can I invert (or decide my myself) how the $link_objects should be built?

Can I just reverse the order somehow from the GUI?

Thanks in adv advance

Alex

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: $link_objects build order
« Reply #1 on: February 18, 2014, 03:04:53 am »
IIRC, right click on file properties look for the weight setting make it lower; normally I use 0 to get it the first file compiled/linked.

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Vikingo

  • Single posting newcomer
  • *
  • Posts: 7
Re: $link_objects build order
« Reply #2 on: February 18, 2014, 05:07:08 am »
That works!

Thanks a lot Tim!

Alex