eclipseについて質問です.
現在eclipseでcのプログラムを書こうとしています.
そこで,csvファイルを読み込みたいのですが,以下のようなエラーが出てしまいます.
リンクエラーだということはわかるのですが,解決法がよくわからず詰まっています.
わかる方,いらっしゃいましたら回答をお願いいたします.
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text+0x14): undefined reference to `_fstat'
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-openr.o): In function `_open_r':
openr.c:(.text+0x16): undefined reference to `_open'
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text+0x16): undefined reference to `_write'
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text+0x12): undefined reference to `_close'
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text+0x12): undefined reference to `_isatty'
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text+0x16): undefined reference to `_lseek'
c:/program files (x86)/eclipse/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text+0x16): undefined reference to `_read'
collect2.exe: error: ld returned 1 exit status
A 回答 (2件)
- 最新から表示
- 回答順に表示
No.2
- 回答日時:
クロスコンパイルだよね。
ターゲットの基本ライブラリが構成できてないのではない?
エラーで定義されていないと書いてるのがUNIXシステムコール関数ばかりだし、その呼び出し元はlibc.aの対応関数のリエントラント版だ。
ターゲットOSのシステムコールに合わせてライブラリを事前に構成しておくか、あるいはコンパイル時にターゲットのOSなんかを指定しておかないといけないんじゃない?
No.1
- 回答日時:
> fstatr.c:(.text+0x14): undefined reference to `_fstat'
> openr.c:(.text+0x16): undefined reference to `_open'
> writer.c:(.text+0x16): undefined reference to `_write'
> closer.c:(.text+0x12): undefined reference to `_close'
> isattyr.c:(.text+0x12): undefined reference to `_isatty'
> lseekr.c:(.text+0x16): undefined reference to `_lseek'
> readr.c:(.text+0x16): undefined reference to `_read'
コンパイル時のエラーですね。
上記が全てです。。。
undefined reference to の後に示された関数が定義されていないと言っています。
C言語プログラムの中でファイルI/Oを行いたいのですよね?
必要なヘッダーファイルをincliudeしていますか?
C言語ライブラリのパスは正しく設定できていますか?
参考まで。
回答ありがとうございます.
ヘッダファイルのincludeはしているつもりなのですが,もしincludeし足りないファイルがあるとしたら,それがどれなのかわからない状況です.
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
似たような質問が見つかりました
- その他(プログラミング・Web制作) python flask から fastapiへの移行時のエラー対処 1 2023/02/05 12:26
- その他(プログラミング・Web制作) python 2 2022/12/23 09:06
- Ruby 教えてください 2 2023/01/04 17:50
- その他(プログラミング・Web制作) pythonのこのエラーがわかりません 3 2022/11/16 14:54
- C言語・C++・C# ExcelCS 1 2023/01/27 19:47
- TOEFL・TOEIC・英語検定 教えてください。 (1) Keishiro always ( )calm. ①saw ② staye 3 2022/07/26 21:53
- その他(プログラミング・Web制作) Pythonで会員サイトの自動ログイン ID Nameがない 1 2022/12/16 02:09
- その他(プログラミング・Web制作) python fbprophetについて 1 2022/09/29 19:44
- サーバー WindowsでApache が起動しない 1 2022/11/29 12:21
- UNIX・Linux AWSのEC2のZabbixユーザーでawscliコマンドが実行できない状態を解決する 1 2022/12/06 22:17
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
スタティックリンクライブラリ...
-
visual studio community2017 O...
-
fatal error LNK1104: ファイル...
-
DirectXのdmusici.libについて
-
スタティックライブラリの使い方
-
ライブラリのリンクについて
-
error LNK2001: 外部シンボル "...
-
python エラー
-
エクセルのエラーメッセージ「4...
-
<unistd.h>をVisualStudioでつ...
-
Excelのエラーで困ってます。
-
アプリケーションのDLLファイル...
-
適切な変換関数が存在しない???
-
VBAを何回も作り直して、容量が...
-
VB2008で定数に色の設定をした...
-
C言語でヘッダファイルにグロー...
-
ソフトの開発言語を調べる方法
-
unsigned long long 型のフォー...
-
デバッグ中のエラーのことで教...
-
BCC・stdio.h・_stddef.hのエラー
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
スタティックライブラリ関係の...
-
visual studio community2017 O...
-
【VS2008 C++】2つのプロジェ...
-
fatal error LNK1104: ファイル...
-
#pragma commentの相対パス指定
-
VC++でビルド時の、リンク警告 ...
-
LTspice モデル作成について
-
'd3dx9.lib' が開けません。
-
VC++6.0からVC++.NET2005へ移植
-
「MFCを使用しない」から「MFC...
-
error LNK2019: 未解決の外部シ...
-
dllかlibか
-
error LNK2001: 外部シンボル "...
-
lvwReport/エラー/プロジェクト...
-
mac(osX)で、Javaはどこにイン...
-
'stdafx.h'のエラーに関して
-
ShellExecute関数について(初...
-
C++Builder リンカエラーとは?
-
#include <winreg.h>をインクル...
-
C++によるPostgreSQLの接続
おすすめ情報