I’ve had a bit of a search through the other articles regarding Unresolved External but found nothing to resolve my issue.
I’ve decided to add a dict.app to contain table defintions and global data declarations in a similar way to what DET did in C5 (I think).
When I compile/build an app that requires the declarations, I don’t seem to have an issue with the global data, but I do with the tables. As an example, the error:
I’ve checked the filespec for the procedure involved, there are 4 tables specified, yet the error is only for 2:
(at least I’m pretty sure that is what it’s complaining about).
I’ve reviewed the global properties of dict.app to ensure all files are being exported:
and I’ve checked the dict.exp file and can see the entries in question:
This is the config of the app generating errors:
I’ve tried with declaring module blank and dict, I’ve also tried with all files declared in another .app checked and unchecked.
If I add dict.obj (in the obj folder) to the solution, I get duplicate symbol errors for FILE::Used and global variables.
Any hints on what I may have missed, miscontrued, or just don’t have a handle on?
Andrew, you’ve done a lot of the heavy lifting, just a couple steps to go.
As you noted, your APP settings are correct. Exporting file declarations etc. That causes the generator to generate the EXP file. Looking in there it looks like your stuff is in there, so that’s all good.
The Linker uses the EXP file to create a LIB file. So the next step to check is a) your app includes that LIB file and b) the LIB file you are including is the one you think it is.
a) In the app with the error, you can go to the solution, to the project, to the Libraries section. You should see the name of your Data DLL Lib there. If it’s not, then it can be added to your app as a new External Module.
A new build file worth knowing about in C11 is FileList.XML, that did not exist in C5.
You will find that in your OBJ\BuildType folder named AppName.CwProj.FileList.XML. Technically its not “AppName” but “Target Name” which for most projects is AppName.
In that file you would find under <Opened_Files> where your LIB files are coming from, and <Created_Files> where they were written.
You may find they are from your Obj\Debug folder. As Bruce said you want to modify your RED file so the LIBs are written to the Project folder the same as the DLLs.
I check the OBJ folder to see I only have files in the Debug folder and not Release. I think it is less problem prone to build all projects in a folder one way which for me is Debug, or you can build all Release.
Even after altering the redirection file (which I agree is a good idea), I was still having some errors.
I ended up starting from scratch with that app; extracting and modifying the txa, adding a new file to the solution etc etc, and eventually got a DLL made.
Not 100% yet, I had to fudge one or two things, but I just wanted to get the proof of concept complete so I can start on, and debug, the remaining 40-ish apps.
I’m sure the issues will become less and less as I work my way through them, but C11 is a bit of a change of mind-set from C5, it is going to be a challeng.
Thanks again for all your help. Will post again if I can’t figure something out.
If you haven’t already, you might want to review your use of global unthreaded data (variables, structures, queues, classes, etc). The threading model (since 6.3) has changed, and you might have more work to do to make it thread-safe.
Getting an end to end compile of all apps is my focus at the moment to identify any issues in templates, iron out the migration process, fix old code and processes (so it works in C11) and 1001 other things.
We are aware that threading changed in C6, that will be another mountain to overcome.
The more apps I migrate, the more issues I find when I was hoping for it to be the other way around.
I will no doubt be searching for and posting about threading issues soon enough.