What is the command line syntax that you are using with the Bentley-delivered example (and which one are you compiling)? Could you post the makefile that you made (the one that you say works for you)?
hello Phil,
they are all in this zipfile; http://communities.bentley.com/Other/Old_Site_Files/Member_Folders/m/tamaness_files/default.aspx
in "example zip at post in V8i Programmers Forum, March 18th, 2009"
For me the ones that work are
prehistoric_circuitcomp.bat prehistoric_circuitcomp.mke
Won't work: try1_circuitcomp.bat try1_circuitcomp.mke
(producing try1_produced_make.opt try1_circuitcomp_output.txt )
regards, Jan Willem
Jan,
The Developer Shell is the shortcut that is installed to the start menu group when you install the SDK. If you look at the shortcut definition you will see that it wants the location of MicroStation and the MDLSDK as the parameters. These parameters are passed into the mstndevvars.bat file. The devshell then appends to the path and sets MS and BMAKE_OPT to allow for building with the delivered make files. Make sure that echo is on in the batch file so you can see what is being set in the batch file.
HTH,
Mark Anderson [Bentley]
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
What happens if you do this:
BTW, you really should move your applications to native code, as that is the direction we are going in.
hello,
The wonder happened! It compiled, with the Bentley makefile (I used the original unchanged "circuit"-example again). In first place thank you Mark, for explaining me the developersshell. Maybe stupid, but last decennium I never noticed the icon. (I use TextPad, a tiny, very nice mde, almost like visualstudio).
Then indeed, things turned out to be terribly mixed up. This had to do with Spanish windows, that uses as the defult "Archivos de programa" instead of "Program Files", together with MicroStation having been installed in a subpath. Because the path basically appears three times in the developershell's startup command, the command had overflowed, and the result was confusing. I had a pretty tough time changing names into 8.3-format.
Still, I must say I do not like the Bentley-style. If there is something weird, like in this case, the results are totally unexplainable, and I have the idea that the prehistoric style is much more understandable in such cases.
Also thanks Phil, for your suggestions. The whole operation is indeed in order to know more about going native, which I think needs Bentley-style makefiles. So I can now experiment further with this.
thanks, Jan Willem
To see the directory and file names in 8.3 use the dir /X command . Also there is a bmake switch to use 8.3 names use the -X switch.
As for editor I use CodeWright (no longer made as Borland killed it). it is an editor and not much more. People have had success with Native code building the .dll part as a typical win32 dll then building the .ma resource seperate. I am not big on that but it does work. The make file is pretty easy and when you are used to it the process can be simple to debug and very flexible. My advice is to stay with make files as close to ours so that when things go wrong we can step in and help out.
Rgds,
Hello world, some two months later,
During freetime, I'm still trying to experiment with mdl in VS2005, but unfortunately without much progress. While the world seems to use it happily, I am still under the impression that you have to be super-human to do this. That is sad, because Bentley indicates that this is the way to go, and even some code is impossible to make V8i-compatible without going native (search on UPDATE_EACH_ELEMENT)
I am pretty much known to VS2005. I succeeded transferring a Bentley example (cellexp) into a VS2005-project. It compiles; it results in a mdlapp and a dll; it runs; I change code (add a messagebox) and yes, I see the messagebox.
But it doesn't debug; I put a breakline in the code; the dll is compiled in Debug-mode, but execution doesn't stop. Tried a few things, but no way. And without debugging it is pretty hopeless to go native. Another app-command crashes. Why? I have no idea, because it doesn't debug.
It could help if someone would post a small example-VS2005-project; so including .sln and .vcproj; it may contain the magic settings necessary. I can adjust necessary filepaths for my pc. I cannot find such an example anywhere. Would someone do that? I would be very gratefull.
thanks, Jan willem de Pater
Its not that tough. First don't convert to a VCProject just use the make file it will be easier for you to move MDL applications to this form. Second the conversion process is documented in the Programmer's Guide. As for Debugging the first thing I recomend is to work from a clean start. That is if the application has been MDL before go manually delete all of the output files (.mo, .ma etc.). Now once you have built your application start MicroStation, then in VisualStudio attach to ustation.exe and make sure that you are debugging NativeCode (very important). Now once you are attached set a break point at MdlMain (this function should have been DLLEXPORT and Cdecl decorated in your source so it is an easy target). Now in MicroStation load your application the same as always (mdl load APPNAME). If things go right you will hit your main entry point and can start debugging. For the next release of MicroStation we pretty much converted all of the examples to NativeCode so you will get a CelExp that looks like the one attached to this message.
DanPaul: May these examples be available for BDN members before next select update?
CellExp looks similar to CellExplorer. The main difference is this:
#include <MicroStationAPI.h>
However, I don't see that it actually uses any of the MicroStationAPI.
Regards, Jon Summers LA Solutions