Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Importing Modules  (Read 20501 times)
.
Posts: 7


« on: June 03, 2014, 04:03:07 pm »

What setting do I need to change within Studio so that I do not get errors trying to import modules?

import fgl modname will always give me an error in the editor, saying that the module could not be found. However the project will build and run without issue.
Bernard M.
Four Js
Posts: 45


« Reply #1 on: June 03, 2014, 05:21:14 pm »

Hi Adam,

Once the imported modules are compiled, if you open the importing module in CE the error messages don't appear anymore.

But as long as the imported modules aren't compiled, meaning the 42m are not present in the current directory or in one of the FGLLDPATH directories, the error messages will appear in CE, even though you are still able to build the project.
 
This behavior may be a bit annoying but as long as the 42m modules are not generated there is no solution to find them.

Regards,
Bernard
.
Posts: 7


« Reply #2 on: June 03, 2014, 05:28:06 pm »

Thank you very much for the quick reply.

The modules are compiled and I have the 42m... however I am still seeing the error in the CE. One of the modules is in the project directory and the other is located in a directory in FGLLDPATH. Both of them give errors in CE.

I would be ok with the error while things are not compiled, but everything is compiled. Is there something I should be checking within studio to confirm the paths are correct?
Bernard M.
Four Js
Posts: 45


« Reply #3 on: June 03, 2014, 05:50:09 pm »

Adam,

Normally the CE won't update its messages as long as you don't modify it or close and reopen it.
Do you still get the error messages once you close and reopen the importing module?

Regards,
Bernard
.
Posts: 7


« Reply #4 on: June 03, 2014, 08:24:58 pm »

I've been trying to solve this problem for a  few days now, I've closed and reopened studio quite a number of times. I'm at a loss for what to look at next.
Reuben B.
Four Js
Posts: 1049


« Reply #5 on: June 03, 2014, 11:48:00 pm »

Adam,

You should state the version of Studio you are using, and also if it is a Local or Remote configuration.  A remote configuration could explain why the build succeeds but the code editor fails, as the build will be executed on your remote server, whilst the real time syntax check for the code editor occurs on your local PC.

Quote
Is there something I should be checking within studio to confirm the paths are correct?

If you right-click on a node in the projects view, there is an option Display Environment.

Quote
import fgl modname will always give me an error in the editor, saying that the module could not be found. However the project will build and run without issue.

Are your imported 4gl's included in your 4pw?
Do they have Exclude from Link set?
If included beneath a library node, is that library linked in the external dependencies to your application?
Have you taken Target Directory into account?
Are all the directories listed in FGLLDPATH beneath a mount point.

Reuben



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
.
Posts: 7


« Reply #6 on: June 04, 2014, 03:18:54 pm »

Reuben,
Thank you so much for the information

I apologize if I did not initially give enough information. I'm running GST Version 2.50.15 build-134200 using a remote configuration.

To answer your questions
I have two imported 4gls, one is included in the 4pw and one is compiled externally. Neither work
The exclude from link is not set.
The library node is linked as a dependency and I have a 42x under that node that works without issue.

What do you mean with the Target Directory? Mine is forced to be relative to the project directory which looks kind of funky. eg: $(ProjectDir)/../../cex. Which, when I display my envirionment gets expanded to: /data3/ttg/TGI/source/mp.4gm/ebay.4gs/../../../../../../data3/ttg/TGI/cex

All the directories in FGLLDPATH are indeed beneath a mount point.
Reuben B.
Four Js
Posts: 1049


« Reply #7 on: June 05, 2014, 01:13:04 am »

Quote
What do you mean with the Target Directory?

On the Application/Group nodes there is a property Target Directory.  I mention it because by default it is $(ProjectDir)/bin, and some people don't realise that the default setting means that the .4gl and .42m files end up in different directories, and set variables such as FGLLDPATH pointing to where the .4gl files, and not where the .42m are.

Quote
What do you mean with the Target Directory? Mine is forced to be relative to the project directory which looks kind of funky. eg: $(ProjectDir)/../../cex. Which, when I display my envirionment gets expanded to: /data3/ttg/TGI/source/mp.4gm/ebay.4gs/../../../../../../data3/ttg/TGI/cex

All the directories in FGLLDPATH are indeed beneath a mount point.

It probably shouldn't be that "funky".  As an exercise take a value such as /data3/ttg/TGI/source/mp.4gm/ebay.4gs/../../../../../../data3/ttg/TGI/cex, and substitute the result of the mount-point into the value e.g. if you have Z: mapped to /data3/ttg/TGI, that value for operations performed locally on the PC is then ...

Z:/source/mp.4gm/ebay.4gs/../../../../../../data3/ttg/TGI/cex

... when ideally it would show in the environment as

/data3/ttg/TGI/cex

and resolve to

Z:/cex


You may need to communicate with your local support to get to that point
 

Reuben



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines