c++ 컴파일시 read: Is a directory error 질문입니다 (뉴비)
글쓴이: 익명 사용자 / 작성시간: 일, 2020/06/14 - 4:44오후
c++ 질문드립니다
cmd 로 pumpkin.cpp 라는 파일을 input folder 와 함께 컴파일 하려고 하는데요.
아래와같은 에러가 자꾸 발생합니다.
C:\pumpkin\pumpkin\src>g++ pumpkin.cpp ./input_10 /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/bin/ld: error: ./input_10: read: Is a directory collect2: error: ld returned 1 exit status
pumpkin.cpp 파일의 소스코드는 아래와같습니다.
#include <iostream>
#include "pk_IO.h"
#include "pk_DataTypes.h"
#include "pk_Pathways.h"
#include "pk_Print.h"
using namespace std;
size_t n_R; // number of reactions
size_t n_S; // number of species
size_t n_t; // number of time-steps
double t_init; // initial time
double t_end; // final time
double f_min;
double tau_lifetime;
int interest;
int max_path;
int max_bp;
bool global_kin;
int main(int argc, const char *argv[])
{
// Reads the location of input folder
string folder = "";
if (argc > 1) folder = string(argv[1]);
cout.precision(12);
Print_license();
In_data kinetics; // Keeps all input data
Rates rates; // Keeps all total rates
Read_kin(kinetics, folder); // Reads input file
Average_kin(kinetics, rates); // Average input data
vector<pathway> PATHS(n_R); // The set of all pathways
Initialize_PATHS(PATHS, kinetics, rates);
Initialize_rates(PATHS, kinetics, rates);
// All brenching points so far
vector<int> all_brenching_points;
// Run baby, run!
Run(PATHS, all_brenching_points, kinetics, rates);
Print_Results(PATHS, rates, kinetics, folder, all_brenching_points);
return 0;
}필요사항에 g++, GNUmake, glpk 를 전부 설치했는데
왜 안되는지 모르겠습니다. 그리고 ld 는 찾아보니 링커라고하는데 자꾸 'Is a direcotry' 라고 뜨는이유를 모르겠습니다. 구글링을 열심히했는데도 도저히 모르겠어요
쉬운문제인거같은데 아시는분들 도와주시면 감사하겠습니다...

directory는 컴파일 못합니다
directory는 컴파일 못합니다
...
글쓴 분이 하고 싶으신 것:
(1) pumpkin.cpp를 컴파일해 실행파일을 만든다.
(2) 그 실행파일에 ./input_10이라는 인자를 주고 실행시킨다.
글쓴 분이 지금 하고 계신 것:
(1) pumpkin.cpp와 ./input_10이라는 두 개의 소스를 같이 컴파일한다.
(2) gcc: "./input_10은 소스가 아닌데?"
댓글 달기