VC++6.0显示cannot compile the file***:no compile tool is associated with ....或者cannot execute program

今天博主在编写数据结构的程序时,发现不能编译,出现cannot compile the file***:no compile tool is associated with the file extension.问题。然后尝试直接选择红色感叹号运行时出现cannot execute program问题。然后博主尝试了很多遍都不OK,百度解决办法。

1、对于cannot execute program,博主百度发现解决办法是Project-》Setting-》Debug选择Executable for debug session选项,选择编译连接后正确的可执行文件的路径就可以了。

来源:https://blog.youkuaiyun.com/lxh1230119/article/details/8067096

但是博主发现自己的路径没问题。

2、所以继续搜索前面一个问题:cannot compile the file***:no compile tool is associated with the file extension.问题

 

 

 

 

解决办法是:关闭当前文件,重新打开一个新的CPP文件即可。

然后就可以编译连接且成功运行程序了。

总结原因:

Determining the location of the ModelSim executable... Using: c:/intelfpga_lite/18.1/modelsim_ase/win32aloem/ To specify a ModelSim executable directory, select: Tools -> Options -> EDA Tool Options Note: if both ModelSim-Altera and ModelSim executables are available, ModelSim-Altera will be used. **** Generating the ModelSim Testbench **** quartus_eda --gen_testbench --tool=modelsim_oem --format=verilog --write_settings_files=off jisuanjizucheng -c jisuanjizucheng --vector_source="F:/Waveform1.vwf" --testbench_file="F:/simulation/qsim//Waveform1.vwf.vt" Info: ******************************************************************* Info: Running Quartus Prime EDA Netlist Writer Info: Version 18.1.0 Build 625 09/12/2018 SJ Lite Edition Info: Copyright (C) 2018 Intel Corporation. All rights reserved. Info: Your use of Intel Corporation's design tools, logic functions Info: and other software and tools, and its AMPP partner logic Info: functions, and any output files from any of the foregoing Info: (including device programming or simulation files), and any Info: associated documentation or information are expressly subject Info: to the terms and conditions of the Intel Program License Info: Subscription Agreement, the Intel Quartus Prime License Agreement, Info: the Intel FPGA IP License Agreement, or other applicable license Info: agreement, including, without limitation, that your use is for Info: the sole purpose of programming logic devices manufactured by Info: Intel and sold by Intel or its authorized distributors. Please Info: refer to the applicable agreement for further details. Info: Processing started: Mon May 26 13:17:22 2025 Info: Command: quartus_eda --gen_testbench --tool=modelsim_oem --format=verilog --write_settings_files=off jisuanjizucheng -c jisuanjizucheng --vector_source=F:/Waveform1.vwf --testbench_file=F:/simulation/qsim//Waveform1.vwf.vt Warning (18236): Number of processors h
最新发布
05-27
### 工具链或QMakeSpec损坏的解决方案 当遇到 `Cannot compile minimal program` 的错误提示时,通常表明开发环境中的工具链配置存在问题或者目标平台的相关依赖未正确安装。以下是可能的原因分析以及对应的解决方法: #### 可能原因一:交叉编译工具链版本不匹配 如果当前使用的交叉编译工具链未能适配目标操作系统(如CentOS7),可能会导致基础程序无法正常编译[^1]。 - **验证工具链版本** 需要确认所用的交叉编译器是否支持目标操作系统的架构和版本。可以通过以下命令检查: ```bash gcc --version ``` - **更新工具链至最新版** 如果发现现有工具链的目标版本过旧,则应升级到最新的跨平台工具链以兼容CentOS7及其多种架构的支持。 #### 可能原因二:Vulkan驱动返回无限数量交换链的问题影响编译过程 某些图形库(如Vulkan)可能存在特定漏洞,例如返回无穷多的交换链数据结构,这可能导致链接阶段失败[^2]。 - **应用修复补丁** 对于已知问题,可以尝试引入官方发布的修补程序来修正此行为。具体做法如下: ```bash git apply /path/to/fix-vulkan-swapchain.patch ``` #### 可能原因三:Qt构建规格(QMakeSpec)文件损坏 QMakeSpec定义了如何针对不同平台设置编译选项。一旦这些文件被篡改或丢失,就会引发类似的错误消息。 - **重新生成默认spec文件** 使用Qt自带工具恢复原始状态下的mkspecs目录内容。 ```bash qmake -query QT_INSTALL_PREFIX/mkspecs/ cp -r /usr/local/qt5/src/mkspecs common_mkspec_backup/ ``` - **指定替代spec路径** 当原生spec不可靠时,可临时切换到其他预设好的模板继续测试。 ```bash configure -spec linux-g++ make && sudo make install ``` 通过上述措施逐一排查并解决问题根源后,应该能够成功完成最小化应用程序的构建工作。
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值