正如标题所说,我似乎无法使用OpenGL和Glut构建项目.
我得到OpenGL函数的Undefined引用错误.
我试过做:
project(testas)
find_package(OpenGL)
find_package(GLUT)
add_executable(testas main.cpp)
Run Code Online (Sandbox Code Playgroud)
但这不起作用.
有什么建议?
基本上我想从laravel命令调用存储库Repository.php上的方法.
Example\Storage\Repository.php
Example\Storage\RepositoryInerface.php
Example\Storage\RepositoryServiceProvider.php
Run Code Online (Sandbox Code Playgroud)
我希望在命令构造函数中使用Interface,然后将其设置为受保护的变量.
在服务提供者中,我将Interface绑定到Repository类.
现在,在start/artisan.php中我写道:
Artisan::add(new ExampleCommand(new Repository());
Run Code Online (Sandbox Code Playgroud)
我可以在这里使用界面吗?什么是正确的方法?我很迷惑.
提前致谢.
编辑:澄清一下,它只能按现在的方式工作,但我不想在注册artisan命令时硬编码具体类.
int main(int argc, char *argv[])
{
cout << strcmp(argv[1], "id");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
它返回false.我错过了什么?
谢谢我让它工作,将在4分钟内接受答复.