Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
undefined parse transform 'tools'
01-05-2017, 10:55 PM
Post: #1
undefined parse transform 'tools'
I'm playing around trying to figure out how to compile plugins for Wings. I'm using Linux Mint OS using Erlang/OTP 19. In order to keep things as simple as possible I'm simply calling 'erlc' on the *.erl files to create a *.beam. (I haven't used a compiled language since performing Y2K work in COBOL!)

When I try to compile wpc_collada.erl (and other plugin sources) --after changing paths to point to the correct included sources from my working directory-- I keep getting this error: 'undefined parse transform 'tools''.

so I follow the includes:
-include_lib("wings-2.1.4.1/src/wings.hrl"). ->
-include("../intl_tools/wings_intl.hrl") ->
-compile({parse_transform,tools}).

And I look at the Erlang reference manual to find that :

Quote:{parse_transform,Module}

Causes the parse transformation function Module:parse_transform/2 to be applied to the parsed code before the code is checked for errors.

Now what? Seems to me that 'parse_transform' is part of Erlang itself, not part of Wings. Has there been a change in Erlang/OTP 19 that causes this error?

Thanks,

--jeff
Reply
01-06-2017, 12:47 AM
Post: #2
RE: undefined parse transform 'tools'
Jeff ... try Change directory into intl_tools directory and build that suite of modules first with its local makefile.

I'm grabbing at straws here ... but it is worth a try.
Reply
01-06-2017, 03:44 AM
Post: #3
RE: undefined parse transform 'tools'
Why not type 'make' from the top directory?
Reply
01-06-2017, 05:08 AM
Post: #4
RE: undefined parse transform 'tools'
Why would I want to use 'make' to compile a single file to move into the Wings plugin directory? Have plugins become so intertwined with the application code that they can't be independently compiled?

I also have to admit that I haven't used 'make' for many years. As a newcomer to Erlang I'd rather focus on learning Erlang and the Wings code base rather than the complexities of the development environment. My modus operandus is always KISS.

There is a parse_transform function in /intl_tools/tools.erl. I can locally compile that without error. I wonder if the error is in reference to this parse_transform rather than the compile function I noted in OP.

I suspect the real issue is that erlc just isn't finding the correct included files. So a env path issue? Does erlc accept some type of path parameter?

--jeff
Reply
01-06-2017, 07:07 AM
Post: #5
RE: undefined parse transform 'tools'
Yes it does, which 'make' sets up for you.
See the makefile if you need to know.
What I mean is that it's more simple to use make
than invoking erlc on your own.
The parse transform is used for language strings in translations.
So not needed for your plugin in the beginning but needed for compiling all the other wings src files. Migth be needed when including wings.hrl I don't remember.
Reply


Forum Jump:


User(s) browsing this thread: 1 Guest(s)