在利用caffe训练torcs自动驾驶出了问题
int main(int argc, char** argv) {
::google::InitGoogleLogging(argv[0]);
////////////////////// set up memory sharing
void *shm = NULL;
struct shared_use_st *shared;
int shmid;
shmid = shmget((key_t)4567, sizeof(struct shared_use_st), 0666|IPC_CREAT);
if(shmid == -1)
{
fprintf(stderr, "shmget failed\n");
exit(EXIT_FAILURE);
}
shm = shmat(shmid, 0, 0);
if(shm == (void*)-1)
{
fprintf(stderr, "shmat failed\n");
exit(EXIT_FAILURE);
}
printf("\n********** Memory sharing started, attached at %X **********\n", shm);
报错:
bin/sh: 1: cannot create .build_release/tools/torcs_run_2lane.o.warnings.txt: Permission denied
tools/torcs_run_2lane.cpp: In function ‘int main(int, char**)’:
tools/torcs_run_2lane.cpp:106:63: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘void’ [-Wformat=]
106 | printf("\n********* Memory sharing started, attached at %X ********\n", shm);
| ~^ ~~~
| | |
| unsigned int void
| %p
tools/torcs_run_2lane.cpp:144:22: error: ‘cvLoadImage’ was not declared in this scope; did you mean ‘cvCloneImage’?
144 | IplImage legend=cvLoadImage("../torcs/Legend6.png");
| ^~~~~~~~~~~
| cvCloneImage
tools/torcs_run_2lane.cpp:255:11: warning: unused variable ‘dist_LL_record’ [-Wunused-variable]
255 | float dist_LL_record=30;
| ^~~~~~~~~~~~~~
tools/torcs_run_2lane.cpp:256:11: warning: unused variable ‘dist_RR_record’ [-Wunused-variable]
256 | float dist_RR_record=30;
| ^~~~~~~~~~~~~~
make: *** [Makefile:539: .build_release/tools/torcs_run_2lane.o] Error 1
make: *** Waiting for unfinished jobs....
src/caffe/net.cpp:22:21: warning: ‘db_tmp’ initialized and declared ‘extern’
22 | extern leveldb::DB* db_tmp=NULL;
| ^~~~~~
我的解答思路和尝试过的方法 : 添加linux的头文件 #include <netbd.h>但是没用
求求大神帮帮我 磕头了!!!!