Installed Powerdraft CONNECT on same machine where is Microstation CONNECT Edition developement environment and now all MDL apps which compiled before without issues compiles with this error - "file does not contain MDL application".
Hi Oto,
I think I will not test to duplicate the situation you described ;-)
Maybe the problem is that because PowerDraft is the last installed application, SDK shell recognize it incorrectly as MicroStation and use something from PowerDraft instead of correctly from MicroStation.
It's not clear how your HelloWorld application is complied, using what tool (bmake?) etc. But if you use bmake, you can try to compile it using BUILD VERBOSE command, which creates very detail log file, and to analyze whether any path to PowerDraft is mentioned in the log.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Ok I will check. HelloWorld is not actual app name but I could try any of delivered examples.
I have seen this error before that was if trying to load ma which is for older versions.
Oto said:HelloWorld is not actual app name but I could try any of delivered examples.
Yes, if the problem appears during the compilation, probably any delivered example can be used as a test.
Just navigate to any example (e.g. \Elements\AccuDrawDemo\ ?) and type build verbose. If your SDK shell is configured correctly, everything should run automatically.
Regards,
Delivered examples compile correctly.
It's important finding ;-)
So now it's about to find where your build recipe (mke file) is different from the example one. My guess it's maybe about linked libraries
Seems to be more related to local character set. Noticed that only difference between ma files is around text strings. Changed system locale to Latvian and after restart most of previous project compile except the latest one.
OS:Windows 7 64-bit English
Removing this from resource file did the trick:
DllMdlApp DLLAPP_Helloworld = { L"Helloworld", L"Helloworld" // taskid, dllName }
Answer Verified By: Oto
Oto said:Removing this from resource file did the trick
Is DllMdlApp defined in another resource file? If so, then presumably you previously had a duplicate resource warning?
DllMdlApp
If not, then I don't understand how your app. can work. The DllMdlApp resource tells MicroStation what to do when you key-in mdl load HelloWorld. It reads the .ma file that contains that resource, and when it finds DllMdlApp it loads the named DLL. Without that information, MicroStation doesn't know that it should load your HelloWorld DLL into memory.
mdl load HelloWorld
HelloWorld
Regards, Jon Summers LA Solutions
Not sure where it is defined but also for other projects the DllMdlApp is not defined in resources. It seems to link automatically at compile.
Oto said:Not sure where it is defined but also for other projects the DllMdlApp is not defined in resources. It seems to link automatically at compile.
It's quite interesting finding, because DllMdlApp has been always presented as mandatory part of MDL application. But maybe when there is one dll and everything is named in the same way, it works even without DllMdlApp definition.
Maybe Robert Hook can provide some insight?
Oto said:Removing this from resource file did the trick:
But it's not the solution, only workaround. It's nothing wrong with DllMdlApp definition, it's standard MDL applications construction and is used also by all native code MicroStation SDK examples (which work fine as you wrote).
Maybe there is a problem with the .r encoding? I am not sure whether rcom is UTF8 aware... but DllMdlApp use wchar_t, so it should be ;-)
Will try to create simple example to test.