0

我有一个如下所示的 .bat 文件,我想在其中将 IDE 中存在的全部内容重定向到某个文本文件。

D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3>C:\ThreePartition\output.txt 
PAUSE

我只能得到一些部分输出,即我无法得到在编译或构建过程中抛出的错误。这是正确的还是任何人都可以建议任何其他方式?

非常感谢麦迪

4

3 回答 3

1

You can try this: D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 > C:\ThreePartition\output.txt 2>&1

You can find a good explanation here. Basically you need to redirect both stdout AND stderr to your file.

Best regards.

于 2009-04-17T12:26:23.647 回答
0

I think you want to combine both those lines into one:

D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run >C:\ThreePartition\output.txt 

OK, looking at your posts here, here and here, it seems you want to log the compilation process. The command for that will be something like (all on one line):

make ThreePartition.mak >C:\ThreePartition\output.txt

Assuming there's a file called ThreePartition.mak.

The command you've been using so far is designed to simply open an interface where you can type commands, which is why you get no output. If you want to log simulation, or a kernel build, there is a file called vxworks_cli_tools_users_guide_6.6.pdf which describes the command line interface, including vxprj in full detail.

Also, are you really using a nant script to call a .vbs to call a .bat to call wrenv.exe? I'm sure there's a simpler way to do that.

于 2009-04-17T12:19:27.220 回答
0

您的批处理正在重定向从 wrenv.exe 发送到标准输出的所有消息。

我从未使用过 WinRiver,但通常 IDE 会在内部管理控制台,并且不会在标准输出/错误流上记录任何消息。

不过,也许可以设置 IDE 控制台的输出。如果是,请尝试将其设置为标准输出。

于 2009-04-17T11:56:20.707 回答