我正在尝试使用CMake构建和安装一些Python代码。 我收到了这个错误:
CMake Error at CMakeLists.txt:6 (enable_langauge):
Unknown CMake command "enable_langauge".
-- Configuring incomplete, errors occurred!
我如何克服它?
这是我的CMakeLists.txt文件:
##########################################
#Project setup
##########################################
cmake_minimum_required(VERSION 2.8.9)
project(PothosAdderDemo)
enable_langauge(python)
find_package(Pothos CONFIG REQUIRED)
include(PothosPythonUtil)
##########################################
## Build and install
##########################################
POTHOS_PYTHON_UTIL(
TARGET MyAdderBlock
SOURCES
__init__.py
MyAdder.py
FACTORIES
"/my_package/adder:Adder"
DESTINATION MyPackage
ENABLE_DOCS
)
答案 0 :(得分:0)
错误输出为您提供了一个非常强烈的提示,说明导致问题的原因是什么:
import java.awt.Component;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
public class test extends JFrame {
public static DefaultTableModel model = new DefaultTableModel();
public static void main (String args[]){
JTable table = new JTable();
table.setDefaultRenderer(String.class, new CheckboxTableCellRenderer());
table.setModel(model);
model.addRow(new Object[] {"testData2","testData1"});
JFrame frame = new JFrame();
frame.add(list);
frame.pack();
frame.setVisible(true);
}
public static class CheckboxTableCellRenderer<E> extends JCheckBox implements
TableCellRenderer {
@Override
public Component getTableCellRendererComponent( JTable table,
Object value, boolean isSelected, boolean hasFocus,
int row, int column ){
setComponentOrientation(table.getComponentOrientation());
setFont(table.getFont());
setText(String.valueOf(value));
setBackground(table.getBackground());
setForeground(table.getForeground());
setSelected(isSelected);
setEnabled(table.isEnabled());
return this;
}
}
}
&#34;语言&#34;拼错;纠正拼写应该让你解决这个问题。