c++ 컴파일시 read: Is a directory error 질문입니다 (뉴비)

익명 사용자의 이미지

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' 라고 뜨는이유를 모르겠습니다. 구글링을 열심히했는데도 도저히 모르겠어요

쉬운문제인거같은데 아시는분들 도와주시면 감사하겠습니다...

drinkme의 이미지

directory는 컴파일 못합니다

jick의 이미지

글쓴 분이 하고 싶으신 것:

(1) pumpkin.cpp를 컴파일해 실행파일을 만든다.
(2) 그 실행파일에 ./input_10이라는 인자를 주고 실행시킨다.

글쓴 분이 지금 하고 계신 것:

(1) pumpkin.cpp와 ./input_10이라는 두 개의 소스를 같이 컴파일한다.
(2) gcc: "./input_10은 소스가 아닌데?"

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.