Home AMX User Forum NetLinx Studio
Options

Netlinx not finding include files

I have a workspace with 3 systems that all share some common modules and includes. If the first system is active, I can re-compile the modules, but in the other two, they complain about not being able to find my includes, so I need to switch back to the first system to compile. The Include files are in workspace/includes and the modules are in workspace/modules.

What would be the proper syntax to the include statement? In the working system I just have:

INCLUDE 'FOO_Include'
which works

it seems like it should be one of these
INCLUDE '../includes/FOO_Include'
INCLUDE 'includes/FOO_Include'
INCLUDE '/includes/FOO_Include'

But neither of those work either, nor do they work with backslashes.

Comments

  • Options
    DHawthorneDHawthorne Posts: 4,584
    I've never been successful with path information in an INCLUDE statement. If the include is workspace specific (including one with multiple projects) I just dump it in the same folder as the rest of the workspace files. If it's common to multiple projects, I have a folder just for those, and have the path set in the NS settings for library paths.
  • Options
    AuserAuser Posts: 506
    Under certain circumstances include files won't be found when hitting F7 to compile while editing a module, even though they are in the includes folder of the workspace for the active system. I can't remember what situation causes this off the top of my head - perhaps include files being included within other include files. If you right click -> Compile on the module in the workspace tree or do a Build System, then they'll compile. Bug.

    I'm in the habit of right click -> compiling modules that I'm editing as I've seen the behaviour frequently. I've never used paths in #INCLUDE directives, having them in the workspace tree for the system *should* be enough for the compiler to find them you would think.
  • Options
    travistravis Posts: 180
    DHawthorne wrote: »
    I've never been successful with path information in an INCLUDE statement. If the include is workspace specific (including one with multiple projects) I just dump it in the same folder as the rest of the workspace files. If it's common to multiple projects, I have a folder just for those, and have the path set in the NS settings for library paths.

    It's not possible to make it put the compiled files into a sub directory is it? .tkn and .src and .tko for every module and system makes the workspace directory so untidy.
  • Options
    Jorde_VJorde_V Posts: 393
    travis wrote: »
    It's not possible to make it put the compiled files into a sub directory is it? .tkn and .src and .tko for every module and system makes the workspace directory so untidy.

    I keep my modules in separate dirs. i.e. \modules\<modulename>\

    I also put my include files there.

    Also I have no issues with the include files when they're in those dirs.
Sign In or Register to comment.