Hi Mohammad,
[quote user="Mohammad Aryafar"]My only option is this version of Microstation that I mentioned.[/quote]
If it's the only option, there is no choice. It's just about to be aware sometimes you will receive advices like "use native code" and "migrate to V8i or CONNECT Edition".
[quote user="Mohammad Aryafar"]I found it very confusing using it[/quote]
I agree for 100% to understand make file is really complex and can be confusing. It has been discussed many time why Bentley use it. I have to admit I aslo fight and struggle with mke file every time I create a new project ;-) On the other hand a building system like GNU make or NMake is the core how all C/C++ aplications are built regardless on the platform. Many "I call myself developer" clicking in Visual Studio think it's "push the button" process, but Visual Studio also creates and calls make file (project file) at background.
There are valuable information in MDL documentation about make file syntax and you can also use tutorials for GNU make system, because they are very similar.
But as I wrote: To call compiler and linker manually from own batch file is not bad idea, because it requires to understand how the whole systems works. But for real development it's not flexible enough from many reasons (e.g. such batch file will compile and link everything from scratch every time, which is long process, but bmake is able to detect changed files only).
[quote user="Mohammad Aryafar"]as the most simple example (basic) uses multiple files[/quote]
It's how C/C++ projects are done (source file plus header file as minimum) and it has nothing to do with MicroStation and MDL, it's C/C++ topic. The number of files is extended by resource files, which are not MicroStation specific (you can find resource files in Windows also), but MDL uses resources frequently to define messages, dialogs, palletes etc.
It means if "Hello world" requires 2 files (.c and .h), Basic example with dialogs, icons and commands require many files. That's reality.
[quote user="Mohammad Aryafar"]and it's really hard to go through as a beginner.[/quote]
I agree. I think learning path can be:
- To be able to compile and link manually one source file into ma
- To be able to add resources like e.g. simple dialog or message list
- Manuall (or using batch file) building helps to understand the whole process, which is the key for further steps
- To learn make file syntax and to be able to convert batch file to mke file
[quote user="Mohammad Aryafar"]How can I put this into .cpp and .h and .mke and etc?[/quote]
There are 2 different topics merged in your question:
- .cpp and .h: It's about to use Visual C 6.0 (very old one) and bmake to put everything together. To know bmake and be able to create correct mae file is mandatory in my opinion for this steps, because bmake (based on definitions in mki files) takes care about correct calling Visual C compiler and linker with all paramaters. I guess this step is not very important now.
- .mke: Read Building Application chapter in MicroStation Programmer Guide (I am not sure if the name is the same in V8 2004 Edition)
and study examples delivered with SDK, namely their make files. You can also search Internet for GNU make tutorials.
With regards,
Jan