LLVM linker error
Nerd10000 opened this issue · 5 comments
I don't know how can I fix this but the error is this : renderer-378788.o : error LNK2019: unresolved external symbol "public: __cdecl TGAImage::TGAImage(int,int,int)" (??0TGAImage@@qeaa@HHH@Z) referenced in function main
renderer-378788.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::set(int,int,struct TGAColor)" (?set@TGAImage@@QEAA_NHHUTGAColor@@@z) referenced in function main
renderer-378788.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::write_tga_file(char const *,bool)" (?write_tga_file@TGAImage@@QEAA_NPEBD_N@Z) referenced in function main
renderer-378788.o : error LNK2019: unresolved external symbol "public: __cdecl TGAImage::~TGAImage(void)" (??1TGAImage@@qeaa@XZ) referenced in function main
a.exe : fatal error LNK1120: 4 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
C:\Users\Dragon\Desktop\Fontos Fájlok\Rust\C\renderer>clang++ renderer.cpp
renderer.cpp:1:10: error: 'tga.h' file not found with include; use "quotes" instead
#include <tga.h>
^~~~~~~
"tga.h"
1 error generated.
C:\Users\Dragon\Desktop\Fontos Fájlok\Rust\C\renderer>clang++ renderer.cpp
renderer-cdcff4.o : error LNK2019: unresolved external symbol "public: __cdecl TGAImage::TGAImage(int,int,int)" (??0TGAImage@@qeaa@HHH@Z) r@Z) referenced in function main
renderer-cdcff4.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::set(int,int,struct TGAColor)" (?set@TGAImage@mage@@QEAA_NHHUTGAColor@@@z) referenced in function main
renderer-cdcff4.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::write_tga_file(char const *,bool)" (?write_tgte_tga_file@TGAImage@@QEAA_NPEBD_N@Z) referenced in function main
renderer-cdcff4.o : error LNK2019: unresolved external symbol "public: __cdecl TGAImage::~TGAImage(void)" (??1TGAImage@@qeaa@XZ) referencedenced in function main
a.exe : fatal error LNK1120: 4 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
C:\Users\Dragon\Desktop\Fontos Fájlok\Rust\C\renderer>clang++ renderer.cpp
C:\Users\Dragon\Desktop\Fontos Fájlok\Rust\C\renderer>a.exe
Hell C++
C:\Users\Dragon\Desktop\Fontos Fájlok\Rust\C\renderer>clang++ renderer.cpp
renderer-fd737d.o : error LNK2019: unresolved external symbol "public: __cdecl TGAImage::TGAImage(int,int,int)" (??0TGAImage@@qeaa@HHH@Z) referenced in function main
renderer-fd737d.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::set(int,int,struct TGAColor)" (?set@TGAImage@@QEAA_NHHUTGAColor@@@z) referenced in function main
renderer-fd737d.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::flip_vertically(void)" (?flip_vertically@TGAImage@@QEAA_NXZ) referenced in function main
renderer-fd737d.o : error LNK2019: unresolved external symbol "public: bool __cdecl TGAImage::write_tga_file(char const *,bool)" (?write_tga_file@TGAImage@@QEAA_NPEBD_N@Z) referenced in function main
renderer-fd737d.o : error LNK2019: unresolved external symbol "public: __cdecl TGAImage::~TGAImage(void)" (??1TGAImage@@qeaa@XZ) referenced in function main
a.exe : fatal error LNK1120: 5 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
Okay thank you .
Was it fix?
What is the build setup? Have you used the cmake description of the project?
I'd recommend using it instead of compiling individual c++ files by hand.