hello guys,
Thanks to your input I am able to smell at compiling to native code, and using Visual Studio. Above all, I like the la-solutions article that Jon indicated. Also, I found http://www.sumbera.com/ustation/tutorial/tonative.htm very informative, although it is a little bit older, and it deals with Visual Studio VC6.
In order to go further, I have to understand compiling Bentley-style makefiles and that is a big deal. I have been programming mdl for some fifteen years now, always using prehistoric-style makefiles, and keeping miles and miles away from any Bentley .mki-file. I am able to tell a prehistoric-style makefile where MicroStation is, where rcomp, mcomp etc are, what the dependencies are, where the includefiles are, where the libraries are, where the input is, where it must put the output.
But for nativecode, I must go Bentley-style, because translating the necessary commands and options to prehistoric-style makefiles looks even more impossible to me.
I tried now again, to compile Bentley-example "circuit". No native-code or Visual Studio yet. After a hard struggle, I was able to get it compiled for MicroStation XM. But for V8i: nope. In spite of many hours trying, I keep getting punished with different kinds of problems. If someone could have a look at the files in next zip, (there is an output capture) and do a suggestion of a solution, I would be most gratefull.
http://communities.bentley.com/Other/Old_Site_Files/Member_Folders/m/tamaness_files/default.aspx
In this zip, try1_circuitcomp.bat and try1_circuitcomp.mke produce try1_produced_make.opt and try1_circuitcomp_output.txt on my computer. The problem seems to be that bmake produces a make.opt with empty lines with only -i, but I cannot find which variable should be defined where to make it work. I cannot find a clear document about this, neither (such as the MDLProgrammerGuide.chm) With other tries, I had different but likewise results.
In case you wonder what I mean when talking about a prehistoric-style makefile, I made prehistoric_circuitcomp.bat and prehistoric_circuitcomp.mke and yes,that compiles for V8i on my comp.
Also, it would be interesting to know if I am the only one who sees the Bentley-style makefile as such a complete disaster, and if the whole world is compiling them happily.
regards, Jan Willem
I suggest that you take a step back and use the developer shell that ships with the sdk. You do not need to set up all of the environment it is done in the mstndevvars.bat file. Next I would use the .mki files that we ship as we look for where VisualStudio is installed and set the paths for those tools correctly (according to the registry ). There are a number of native code examples delivered with the MicroStationVii SDK. Once you can compile in the developer shell that we ship you can make a copy of it and then add to input parameters (or more) to allow passing in the various parameters to control compiling. Looking at the files that you posted you have the classpath set (which is no longer needed) and your questions on setting of MS is so we know where the toolsubs library is since rcomp etc depend on that dll. There is a lot of documentation on the make file syntax in the programmers guide. For all the native code stuff I refer to the old dlm section and then look at the dlmlink.mki file when things don't work right.
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx