mkhaldi@gosympatico.ca wrote:
I have a question about implementation and interface. If i want only to get the interface from a module which has an implementation module, how must I do to get also the symbol init_XXXXX??
example :
module a interface;
export a =all; type string80 = string(80); procedure p; end.
module a implementation; procedure p; ...... ...... end.
module b interface; export b =all; import a; end.
module b impleementation; .... end.
I just want to get the type definition without the implementation of module a. In the b.o file, init_A symbol appears.
Actually, I compile my modules in 2 steps. The first one is with --interface-only to get gpi file. Then, I compile my module with --implementation-only. Sometimes, I only need the interface files. But, importing a module always adds the init_XXX symbol. So what is the solution?
I'm not convinced that this should work at all. If the module interface declares any routines and you omit the implementation, you're basically using an incomplete module.
If that's the expected usage of your module, I suggest to split it up -- one moodule with the declarations that are meant to be used on their own (only constants, types and variables then) with an empty implementation, and another module with the rest (routines, possibly further constants, types and variables).
Frank