如何访问Visual Studio中的save-temps选项?

时间:2019-03-18 15:54:27

标签: c++ visual-studio compilation preprocessor-directive

我是一个完整的编程(通常是IT领域)菜鸟,而且我正在使用Visual Studio环境学习C ++。我想浏览编译器,并查看我的临时文件(以.ii,.s和.o结尾)。

我的教科书告诉我指示编译器使用-save-temps选项进行保存。我不了解的是如何实际访问此-save-temps选项?我在Visual Studio中单击以执行此操作吗?我在哪里找到它?请记住,我是Visual Studio环境的新手。

1 个答案:

答案 0 :(得分:-1)

您应该使用g++ -S main.c -o main.s(GNU C ++编译器)来编译源代码,而不是Visual Studio。

要获取.o文件,请运行onPress。这将给您object file。 它是一个二进制文件,而不是可读的文本文件,这是无法理解的。

要获取.s文件,请运行 <ListItem selected={this.state.registerForm.type == 'item1'} onPress={() => this._handleRegisterFormChanges('item1', 'type')} > <Left> <View style={{ flexDirection: 'column' }}> <Text style={{ alignSelf: 'flex-start' }}>Radio text 1</Text> </View> </Left> <Right> <Radio selected={this.state.registerForm.type == 'item1'} color={Colors.tintColor} selectedColor={Colors.tintColor} /> </Right> </ListItem> <ListItem selected={this.state.registerForm.type == 'item2'} onPress={() => this._handleRegisterFormChanges('item2', 'type')} > <Left> <View > <Text style={{ alignSelf: 'flex-start' }}>Radio text 2</Text> </View> </Left> <Right> <Radio selected={this.state.registerForm.type == 'item2'} color={Colors.tintColor} selectedColor={Colors.tintColor} /> </Right> </ListItem> 。这将给您assembly file。 该文件是源代码的汇编,因此可读。