文件百度网盘链接:pan.baidu.com/.../1TmQvQZhrFZ9k-LtGTgog4w 提取码:pgd8
刘工:您好!
我下载了您的项目文件后在我这边执行bmake -a (-a参数表示all,就类似于VS中的Rebuild),没有任何错误。所以怀疑是否您的编译环境搭建有问题?
请看在我电脑上执行bmake -a的结果。我是在MSCE-U16.2 最新环境下编译的。
C:\Users\yongan.fu\Downloads\HelloWorld\HelloWorld>bmake -a Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018 Tue Apr 26 11:01:32 2022 Running in environment which already has Visual Studio Developer Command Prompt initialized so not importing it. ~mkdir C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\ ~mkdir C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\rscobj\ ~mkdir C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\reqdobjs\ [== Building C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.rsc, (C:\Users\yongan.fu\Downloads\HelloWorld\HelloWorld\HelloWorld.r) ==] rcomp @C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\make.opt MicroStation Resource Compiler 10.16.01 [== Building C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\HelloWorld.ma, (C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.rsc) ==] rlib @C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\make.opt MicroStation Resource Librarian 10.16.01 [== Building C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.obj, (C:\Users\yongan.fu\Downloads\HelloWorld\HelloWorld\HelloWorld.cpp) ==] cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -fp:precise -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4840 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN -DNTDDI_WIN7SP1=0x06010100 -we4692 -nologo -WX -MP -Zi -Zo -FdC:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\objects.pdb -EHs -fp:precise -FoC:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.obj C:\Users\yongan.fu\Downloads\HelloWorld\HelloWorld\HelloWorld.cpp HelloWorld.cpp [== Building "C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\HelloWorld.dll", (C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.obj) ==] link -out:"C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\HelloWorld.dll" -WX -Ignore:4087 -Ignore:4089 -Ignore:4199 -Ignore:4281 -MANIFESTUAC:NO -Release -debug -incremental:no -fixed:no @C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorldlink.rsp Microsoft (R) Incremental Linker Version 14.29.30140.0 Copyright (C) Microsoft Corporation. All rights reserved. -dynamicbase -dll "-out:C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\HelloWorld.dll" "-implib:C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.lib" "-pdb:C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdlapps\HelloWorld.pdb" -debug -incremental:no -fixed:no C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.obj C:\PROGRA~1\Bentley\MICROS~2\library\bentley.lib C:\PROGRA~1\Bentley\MICROS~2\library\mdlbltin.lib C:\PROGRA~1\Bentley\MICROS~2\library\BentleyGeom.lib C:\PROGRA~1\Bentley\MICROS~2\library\DgnPlatform.lib gdi32.lib user32.lib kernel32.lib "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\\lib\x64\msvcrt.lib" C:\PROGRA~1\Bentley\MICROS~2\library\mdlbltin.lib Creating library C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.lib and object C:\Users\yongan.fu\AppData\Local\Temp\Bentley\MICROS~1\objects\HelloWorld.exp Tue Apr 26 11:01:36 2022, elapsed time: 0:04 C:\Users\yongan.fu\Downloads\HelloWorld\HelloWorld>
问题1:执行bmake时带上-a是否可以生成正确的ma+dll?
问题2:您当前的环境编译SDK自带的例子是否会出错?
问题3:您所用的MSCE以及MSCE SDK的版本分别是多少?
Fullscreen 运行HelloWorld.txt Download D:\MDLSource\HelloWorld\HelloWorld>bmake -a Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018 Tue Apr 26 11:16:33 2022 usage: bmake [<+|->options] filename If no filename is specified, try to use a make file with the same name as the current working directory. - Option is local to current make file + Option is global to all make files a Always build all targets C Print conditional level D Delete targets dTEST=1 Define macro (TEST = 1) fEXT Filter targets (only build files with extension EXT) i Ignore errors l List targets m Missing files are OK n No execution p Print macros q Quiet mode (no salutations) s Silent mode t Touch files v Print macros verbose mode w Stop on warnings I Include (.mki) file path P Always process this makefile x<x.exe> Run executable on error L Log file path X Generate _MakeFilePath using DOS 8.3 Format Environment variables: BMAKE_REDIRECT_STDOUT_STDERR Setting the environment variable to 1 directs bmake to properly combine stdout and stderr for redirection to a file. Unless this option is specified, stdout and stderr will be buffered into different streams A side effect is that CreateProcess() is used instead of system(). The blending of stdout and stderr is temporally disabled if redirection is used within the .mke file BMAKE_CommandTimingLog Contains the full file specification of an optional log file that records commands executed and their duration. This option is useful for generating logs needed to compare build times from multiple runs. The format of the log file is: <sequence_number>,<bmake_nesting_level>,<command_execution_time_in_milliseconds>,<command_exit_status>,<command_string> BMAKE_CommandTimingLogMaxLineLength Specifies the maximum number of characters of <command_string> that are written to the log file. The default length is the first 130l characters. BMAKE_EOE_PARAMS Setting the environment variable to the optional parameters used by the program specified by the "-x" parameter. D:\MDLSource\HelloWorld\HelloWorld>
D:\MDLSource\HelloWorld\HelloWorld>bmake -a Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018 Tue Apr 26 11:16:33 2022 usage: bmake [<+|->options] filename If no filename is specified, try to use a make file with the same name as the current working directory. - Option is local to current make file + Option is global to all make files a Always build all targets C Print conditional level D Delete targets dTEST=1 Define macro (TEST = 1) fEXT Filter targets (only build files with extension EXT) i Ignore errors l List targets m Missing files are OK n No execution p Print macros q Quiet mode (no salutations) s Silent mode t Touch files v Print macros verbose mode w Stop on warnings I Include (.mki) file path P Always process this makefile x<x.exe> Run executable on error L Log file path X Generate _MakeFilePath using DOS 8.3 Format Environment variables: BMAKE_REDIRECT_STDOUT_STDERR Setting the environment variable to 1 directs bmake to properly combine stdout and stderr for redirection to a file. Unless this option is specified, stdout and stderr will be buffered into different streams A side effect is that CreateProcess() is used instead of system(). The blending of stdout and stderr is temporally disabled if redirection is used within the .mke file BMAKE_CommandTimingLog Contains the full file specification of an optional log file that records commands executed and their duration. This option is useful for generating logs needed to compare build times from multiple runs. The format of the log file is: <sequence_number>,<bmake_nesting_level>,<command_execution_time_in_milliseconds>,<command_exit_status>,<command_string> BMAKE_CommandTimingLogMaxLineLength Specifies the maximum number of characters of <command_string> that are written to the log file. The default length is the first 130l characters. BMAKE_EOE_PARAMS Setting the environment variable to the optional parameters used by the program specified by the "-x" parameter. D:\MDLSource\HelloWorld\HelloWorld>
运行myapp下面没有问题,运行我这个helloWorld结果也没有变红色,就是感觉不太对,执行bmake -a不会生成ma和dll文件,使用的msce是MicrostationStation CE15,SDK是mssdk10150076en
打开HelloWorld.r这个文件随便修改一下,例如在某一行的末尾加个空格,然后保存再编译一下试试。
您目前贴出的这个提示和您在微信群里贴出的结果不同呀。目前这个提示应该是在您D:\MDLSource\HelloWorld\HelloWorld文件夹下找不到名字是HelloWorld.mke的文件。请列出该文件夹下的所有文件看一下。
bmake命令后面(除了可以添加命令选项,如-a,外)其实是可以跟上一个mke文件名的。如果不跟,就会以最后一级文件夹的名称作为mke文件名。举个例子:比如SDK中C:\Program Files\Bentley\MicroStationCONNECTSDK\examples\Elements\SteelMaster\Baseline下的mke文件就不是Baseline.mke而是steel.mke,对于此种情况,需要进入该文件夹后键入bmake -a steel.mke来编译这个项目。
C:\PROGRA~1\Bentley\MICROS~2\examples>cd/d D:\MDLSource\HelloWorld\HelloWorld D:\MDLSource\HelloWorld\HelloWorld>bmake -a Bentley Systems Make Utility. Version 10.00.00.26, Mar 15 2018 Tue Apr 26 11:37:47 2022 ~mkdir C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ ~mkdir C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\rscobj\ ~mkdir C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\reqdobjs\ [== Building C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.rsc, (D:\MDLSource\HelloWorld\HelloWorld\HelloWorld.r) ==] rcomp @C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt MicroStation Resource Compiler 03.20.02 [== Building C:\PROGRA~1\Bentley\MicroStation, (C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.rsc) ==] rlib @C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt MicroStation Resource Librarian 03.20.02 [== Building C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.obj, (D:\MDLSource\HelloWorld\HelloWorld\HelloWorld.cpp) ==] cl -IC:\PROGRA~1\Bentley\MICROS~2\include\ -fp:precise -GS- -EHc -GR -wd4345 -GF -favor:blend -D_X64_ -wd4701 -wd4244 -wd4564 -wd4840 -wd4702 -c -W4 -DBENTLEY_WARNINGS_HIGHEST_LEVEL -DWIN32 -DwinNT -MD -D__EXCEPTIONS -D_VISCXX -Gy -wd4996 -Ox -Oy- -Os -D_CONVERSION_DONT_USE_THREAD_LOCALE -D_SECURE_SCL=0 -DWIN32_LEAN_AND_MEAN -DNTDDI_WIN7SP1=0x06010100 -we4692 -nologo -WX -MP -Zi -Zo -FdC:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\objects.pdb -EHs -fp:precise -FoC:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.obj D:\MDLSource\HelloWorld\HelloWorld\HelloWorld.cpp HelloWorld.cpp [== Building "C:\PROGRA~1\Bentley\MicroStation CONNECT Edition\MicroStation\mdlapps\HelloWorld.dll", (C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.obj) ==] link -out:"C:\PROGRA~1\Bentley\MicroStation CONNECT Edition\MicroStation\mdlapps\HelloWorld.dll" -WX -Ignore:4087 -Ignore:4089 -Ignore:4199 -Ignore:4281 -MANIFESTUAC:NO -Release -debug -incremental:no -fixed:no @C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorldlink.rsp Microsoft (R) Incremental Linker Version 14.16.27045.0 Copyright (C) Microsoft Corporation. All rights reserved. -dynamicbase -dll "-out:C:\PROGRA~1\Bentley\MicroStation CONNECT Edition\MicroStation\mdlapps\HelloWorld.dll" "-implib:C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.lib" "-pdb:C:\PROGRA~1\Bentley\MicroStation CONNECT Edition\MicroStation\mdlapps\HelloWorld.pdb" -debug -incremental:no -fixed:no C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.obj C:\PROGRA~1\Bentley\MICROS~2\library\bentley.lib C:\PROGRA~1\Bentley\MICROS~2\library\mdlbltin.lib C:\PROGRA~1\Bentley\MICROS~2\library\BentleyGeom.lib C:\PROGRA~1\Bentley\MICROS~2\library\DgnPlatform.lib gdi32.lib user32.lib kernel32.lib "D:\VS\VS2017\VC\Tools\MSVC\14.16.27023\\lib\x64\msvcrt.lib" C:\PROGRA~1\Bentley\MICROS~2\library\mdlbltin.lib 正在创建库 C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.lib 和对象 C:\Users\Administrator\AppData\Local\Temp\Bentley\MicroStationSDK\objects\HelloWorld.exp Tue Apr 26 11:37:51 2022, elapsed time: 0:04 D:\MDLSource\HelloWorld\HelloWorld>
符老师,昨晚配置环境是这个问题,今天没出现bmake文件的问题,可能这个环境配置的有问题,我的是VS2017 使用的msce是MicrostationStation CE15,SDK是mssdk10150076en,有一个地方出错,就有问题,环境比较难配置