NS Compile issue with system other than 1
syslock
Posts: 45
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
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
0
Comments
Jeff
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).
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?
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:
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!
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.
Kostas
Thanks for the tip.
Its a bug then.