简体   繁体   中英

file not recognized: File format not recognized error in C

Hey I am currently learning C and tried to divide my code in multiple files. But when it comes to compile the project, I got this error :

    mingw32-gcc.exe -Wall -g  -c D:\IDE\CodeBlocks\Projects\Tuto\main.c -o obj\Debug\main.o
    mingw32-g++.exe  -o bin\Debug\Tuto.exe obj\Debug\dico.o dico.h.gch obj\Debug\main.o   
    dico.h.gch: file not recognized: File format not recognized
    collect2.exe: error: ld returned 1 exit status

I tried to clean and/or rebuild my project but nothing goes through this issue. Can anyone help me please ??

dico.h.gch is a precompiled header. You aren't supposed to link it with your objects. Remove it from the line that creates Tuto.exe .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM