Home AMX User Forum NetLinx Studio

NS Compile issue with system other than 1

Hi All,
I'm working on a project with 5 NI systems in it.
In Netlinx Studio I've created and setup a Work space with a Project and 5 Systems.
I have a bunch of modules that are common to all systems and an include file that is common to all systems.

When I set system 1 active open a module XXX and compile it, it compiles fine
When I set any other system active and open module XXX and compile it, it complaines

ERROR: E:\WORK\AUDIO VISUAL\PROJECT CODE\AMX\RESIDENTAIL\??????\2011-07-18\INUNU MDLS\DEV NIS V2\Dev NI.axs(19)NetLinx Pre-Processor Error: Could not find the include file ProjectInc.axi

I tried making a new work space setting up the module, it compiles when System 1 is set active I then copied and pasted system 1 using netlinx studio to system 2 and setting system 2 to active and the exact same files don't compile displaying error above.

Any suggestions or is this just a bug in Netlinx Studio.
Thanks guys

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    I think we were/are having a similar problem. Did you try compiling with the shared files closed?

    Jeff
  • AuserAuser Posts: 506
    There appears to be a difference in how the preprocessor/compiler search through paths for files depending on whether you hit F7 to compile while editing a file (fail), or right click on the module in the workspace tree and choose compile (succeed).

    As far as I can figure it's a bug and has been a pain in my butt for at least 3 or 4 years. I think it occurs under certain circumstances when you're using include files that aren't in the compiler search path (but do appear in the workspace).

    Are you hitting F7? Try right click -> compile. Failing that, adding the directory where the file that the compiler can't find is to the compiler search paths should fix it (ugly).
  • Hi All,

    Attached is an example of a workspace to illastrate the problem.

    If no system is active.
    F7 compile for System 1/2 Master.axs fails can't find Include 2.axi
    F7 compile for Module 1.axs fails can't find Include 1.axi or Include 2.axi

    If system 1 is set to active
    F7 compile for System 1 Master.axs works
    F7 compile for Module 1.axs works

    If system 2 is set to active
    F7 compile for System 2 Master.axs works
    F7 compile for Module 1.axs fails can't find Include 1.axi or Include 2.axi

    Having the files open or closed makes no diffrence.

    Build Workspace works fine
    Build Project works fine
    Build Active system works fine

    Please don't tell me then to use build active system as these systems have +/- 20 Modules in each system and the time it takes to build all modules each time is too long.

    For now all I can do is make sure system 1 is active each time I need to compile a module in any other system wich is a pain in the butt because when you forget the modules don't compile and then the master won't compile because the tko's are deleted.
    Perhaps I should make a workspace for each system and run 5 instances of Netlinx Studio?

  • Hmm - I just tried your example project and it worked fine for me.

    I made System 2 active (Right click "Set As Active System") and hit F7 for both System 2 Master and Module 1 and both compiled fine:
    ---------- Starting NetLinx Compile - Version[2.5.2.20] [09-26-2011 11:36:16] ----------  
    D:\Download\Unpack\Module File\Module 1.axs  
    D:\Download\Unpack\Module File\Module 1.axs - 0 error(s), 0 warning(s)  
    Compiled Code takes 8672 bytes of memory -- Token and Variable Count is 607 (Maximum is 100000)  
    NetLinx Compile Complete [09-26-2011 11:36:16]  
       
    ----------- Starting NetLinx Compile - Version[2.5.2.20] [09-26-2011 11:36:16] -------------  
    D:\Download\Unpack\System 2 Master.axs  
    D:\Download\Unpack\System 2 Master.axs - 0 error(s), 0 warning(s)  
    Compiled Code takes 8697 bytes of memory -- Token and Variable Count is 607 (Maximum is 100000)  
    NetLinx Compile Complete [09-26-2011 11:36:16]  
       
    >>>>--- NetLinx Compiles:  2 Files  0 Total Error(s)  0 Total Warnings(s) ---<<<<  
    

    Have I missed something?

    EDIT: Sorry I just realised that I have remapped F7 to "Rebuild All". I do get the error with a normal compile. Apols for red herring!
  • AuserAuser Posts: 506
    syslock wrote: »
    For now all I can do is make sure system 1 is active each time I need to compile a module in any other system wich is a pain in the butt because when you forget the modules don't compile and then the master won't compile because the tko's are deleted.

    Not strictly true - you can right click -> "Compile" on the file in the workspace tree (module or master source file) as noted in my post above. The compilation WILL succeed if you do this.

    I just got used to it and it's become habit - I very rarely hit F7 anymore.
  • I never had any issues using either way. I still use both F7 and Right Click. The only think i make sure is to Activate the system i want to compile.

    Kostas
  • Auser wrote: »
    Not strictly true - you can right click -> "Compile" on the file in the workspace tree (module or master source file) as noted in my post above. The compilation WILL succeed if you do this.

    Thanks for the tip.

    Its a bug then.
Sign In or Register to comment.