小编Yan*_*ang的帖子

在 ubuntu 18.04 LTS 上安装 caffe

我正在 Ubuntu 18.04 LTS 版本上安装 caffe-cpu 和 anaconda。

无论如何,我成功地在我的系统上安装了 Anaconda,但是我在安装 caffe 时遇到了麻烦。

我找到了很多页面,例如youtube,但没有帮助,所以我阅读了很多官方安装手册页面(我认为这是官方页面)。在这个页面,

Installing Caffe from source

We may install the dependencies by merely one line
sudo apt build-dep caffe-cpu        # dependencies for CPU-only version
sudo apt build-dep caffe-cuda       # dependencies for CUDA version
Run Code Online (Sandbox Code Playgroud)

它需要在你的sources.list 中有一个deb-src 行。继续合

我不知道结束行的意思。我试图修复/etc/apt/sources.list为禁用的
“#”部分,但它失败了。我在互联网上找不到正确的方法。当我只是按照编译链接时,他们说使用 Make 或 CMake 进行编译。我也不知道如何跟踪这些信息。我发现了一些makefile.config Github 页面,当我使用make all命令时它失败了。

你能给我一些建议来帮助安装 caffe-cpu 版本吗?感谢您阅读我的问题。

makefile caffe ubuntu-18.04

5
推荐指数
1
解决办法
7790
查看次数

为什么Linux无法捕获C ++运行时错误,例如使用浅拷贝构造函数?

我正在研究c ++复制构造函数。我编写了使用浅拷贝构造函数的代码,该构造函数会导致运行时错误进行研究。我的意图是使运行时错误。

#include <iostream>
#include <cstring>
using namespace std;

class Person{ //define Person class                                                                  
  char *name;
  int id;
public:
  Person(int id, const char *name);//constructer                                                     
  ~Person();//distructer                                                                             
  Person(Person& p){
    this->name = p.name;
    this->id = p.id;
  }
  void changeName(const char *name);
  void show(){
    cout << id <<',' << name <<endl;
  }
};

Person::Person(int id, const char *name){
  this -> id = id;
  int len = strlen(name);
  this->name = new char[len+1];
  strcpy(this->name,name);
}
Person::~Person(){
  if(name)
    delete []name;
}

void Person::changeName(const char *name){
  if(strlen(name) > …
Run Code Online (Sandbox Code Playgroud)

c++ linux

2
推荐指数
1
解决办法
103
查看次数

如何在 Windows 上找到系统调用?

我是汇编代码的初学者。我从来没有使用过windows汇编代码,所以我真的很困惑。

当我在 Windows 11、Visual Studio 2022 中运行时,我尝试捕获系统调用。printf("hello world!\n")我在最后一段编写了整个代码。

其实我想做的是,捕获工作printf()期间调用的系统调用printf()。这意味着,我想找到c库如何调用系统调用。

嗯,我确实喜欢这样……

  1. 在VS2022上编写printf("hello world!\n");完成的代码。
  2. 在行处设置断点printf()
  3. 使用发布模式、x64 架构运行本地 Windows 调试器。
  4. 在vs2022上打开反汇编窗口和注册窗口。
  5. 按一次仅运行一行F11

我试过了...

  1. findsyscall函数,但是VS2022的反汇编无法搜索syscall
  2. 找到call函数行并尝试搜索 RAX 代码更改为0x0001(windows systemcall) ,但我找不到。
  3. 发现 RAX 代码更改为0x0001,但我发现 RAX 代码更改0x0001add函数之类。
  4. 找到输出出现在终端上的代码行,但我F11在 10 分钟内按下了键。它是否正确?但是,更多的汇编代码仍然存在,没有完成代码运行。

所以,我有一些问题...

  1. 这个捕获系统调用的过程正确吗?如果不是,我该如何尝试?
  2. 我试图搜索哪些汇编函数调用系统调用。答案是syscallor 'call' with RAX values changes like windows system call such as '0x0001',即先查找syscall …

c assembly system-calls windows-11

2
推荐指数
1
解决办法
721
查看次数

标签 统计

assembly ×1

c ×1

c++ ×1

caffe ×1

linux ×1

makefile ×1

system-calls ×1

ubuntu-18.04 ×1

windows-11 ×1