0

私はアームネオンアセンブリで書かれたいくつかの関数を含むCプロジェクトを持っていますが、コンパイルできません.main()があるファイルからいくつかのエラーがあり、非常にあいまいなようです.コンパイル用であり、asm 関数なしで MSVC で正常にビルドおよび実行されます。どうした?

/* TestApp.c file */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){ 
FILE    *inFile = NULL;
FILE    *outFile = NULL;
...
malloc();
...
printf("malloc failed");
...
memcpy();
....
...
}

Error form ARMCC 4.5.2
Warning: L6412W: Disabling merging for TestApp.o(.conststring), unsupported relocation R_ARM_REL32 from TestApp.o(i.main)
Error: L6769E: Relocation #REL:41 in printf.o(.text) with respect to __stdout. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:6 in fopen.o(.text) with respect to __stdin. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:2 in _printf_char_file.o(.text) with respect to fputc. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:22 in initio.o(.text) with respect to __stdin. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:23 in initio.o(.text) with respect to __stdout. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:24 in initio.o(.text) with respect to __stderr. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:25 in initio.o(.text) with respect to __stdin. No GOTSLOTexists for symbol.

. . .

4

1 に答える 1

0

この質問には、プログラムの構築方法に関する情報が欠けています。動的ライブラリのコンパイル中に stdlib を静的にリンクしようとしているようです。

動的ライブラリを構築するときは、静的ライブラリではなく、動的ライブラリをリンクしてください。動的ライブラリを作成したくない場合、問題は含まれていないメイクファイル内にある可能性が最も高いです。

于 2015-11-24T08:30:03.083 に答える