Why do Global data types in a dct get classed as unresolved externals?

Global “file” in the dct with some data types declared.

These are classed as unresolved externals by the compiler, when compiling a data dll.

The Global file is declared first before all other global “files” and normal data files in the dct.

I can add the data types definition to the embeds manually before the global MAP and the compiler doesnt complain.

The reason for declaring a global “file” as the first “file” in the dct is because I can then use these data types elsewhere in the dct, but there isnt any way to then disable the generation in the shipping templates, or have an option in the IDE to generate this before the map section using the shipping templates.

Any idea’s why?

TIA

I’m not sure what you mean by “file” in quotes here?

The dictionary has a section for declaring global variables, but that is not a FILE in any shape or form. Is this where you are declaring the TYPE?

There’s also a POOL section, but again this is different.

If you look in your generated CLW you can likely see the TYPE generated in the code, and the FILE generated (where you use the type).

Posting both those blocks of code will likely help either answering your question.

Program
GlobalDataTypes declared here in a global embed doesnt throw a compiler error
Includes('ABC File includes')
Map

End
GlobalDataTypes generated from the dct here throws a compiler error.

Sounds like you’ve got the setting for the data dll set as though it was another dll.

Data dll everything needs to be exported. I can’t remember where the settings are in C6, been a couple of decades.

The data dll is set up properly.

Im beginning to suspect theres a bug in the compiler, but as usual will take time I dont have, to prove it.

There’s a multi-dll example app with Clarion, can you modify that to show us what you are actually doing?

Or, can you show us the code from your Clarion generated data_whatever.clw file so we can see what you are declaring in the dct?

Morning Richard.

You’re not showing the actual declarations, or the actual error. Which makes it hard to give you useful information.

I doubt there’s an error in the compiler, but without sufficient information it’s impossible to say with any confidence.

[Cant say what I really want to say]

Unresolved externals come from the linker not the compiler.
The fact that you are getting unresolved externals means that some of those globals are marked as external. Therefore I suggest your data dll is not setup correctly.

It might be a template error. TYPEs cannot be exported, so the template might be marking them as EXTERNAL in not-the-data-dll.

Without seeing the actual code, and location of the error, this is just speculation.