Author Topic: Why doesn't #include use up to date version of included source?  (Read 10170 times)

Aaron

  • Guest
I have a file where a declare a large array of strings.  Lets say its in filename.e and has:

static _str g_list[] = {
   "String1",
   "String2",
   ...
   "StringN"
}


In my main code, the module I load, I have the line at the top:

#include "filename.e";


However, when I change the values of the strings in the array, or even enter gibberish, the module still loads ok with the old values.  Why is this so?!


jbezem

  • Community Member
  • Posts: 87
  • Hero Points: 8
Re: Why doesn't #include use up to date version of included source?
« Reply #1 on: July 21, 2006, 08:14:03 AM »
Did you try using the extension '*.sh' for your included file? All SE sources use it, and I could guess include file handling is different for '*.sh' files.

HTH,

Johan

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Why doesn't #include use up to date version of included source?
« Reply #2 on: July 21, 2006, 08:37:24 AM »

I get the same behaviour as you report.  It looks like slick doesn't check for changes in included files.  It says "macro loaded" but doesn't recompile the macro file if the main file being built hasn't changed.  Guess you have to change and save the main file before doing a load.

Graeme