如何在 eclipse 中构建代码之前运行 vcvars32.bat
How can I run vcvars32.bat before code build in eclipse?
我想用cl编译器编译我的c ++代码。因此,我在 eclipse 中启动了一个"c ++ makefile 项目"。然后我写了我的制作文件。我必须运行 vcvars32.bat首先运行 cl,所以我在 make 文件中编写了该命令,因为它无法正常工作。我现在应该怎么做?如何在构建代码之前运行该命令?顺便说一下,我正在使用 nmake。
我的制作文件如下:
OBJS = helloWorld.o
TARGET = helloWorld.exe
all: $(TARGET)
helloWorld.exe:
**vcvars32.bat**
cl helloWorld.cpp
rm -f *.obj
clean:
rm -f helloWorld.exe *.obj
打开命令行,运行 vcvars32.bat,然后从同一命令行启动 eclipse。
前两个步骤可以通过转到Start->Visual Studio xxx->Visual Studio Tools->VS command prompt
合并为一个(确切的命名取决于您安装的内容)
相关文章:
- 运行同一解决方案的另一个项目的项目
- CMake-按正确顺序将项目与C运行时对象文件链接
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- 代码在main()中运行,但在函数中出现错误
- 我在c++代码中生成了一个运行时#3异常
- 如何在linux终端中同时编译和运行c++代码
- 为什么在运行时没有向我们提供有关分段错误的更多信息?
- 如何在运行中期切换GTK CSS style_context
- 如何在MS Visual Studio 2019中运行QT UI
- 如何通过cpp程序运行shell脚本
- IPC使用多个管道和分支进程来运行Python程序
- 删除指向指针的指针是运行时错误吗
- 如何用参数值调用函数(仅在运行时已知)
- 为什么即使使用-cudart-static进行编译,库用户仍然需要链接到cuda运行时
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- c++中的指针和运行时错误
- 在C应用程序中运行C++(带有STL)函数
- 运行程序时出现问题
- 控制允许动态运行c++的并发操作数
- 如何在 eclipse 中构建代码之前运行 vcvars32.bat