Closed Dekadencee closed 7 years ago
Are you linking against spot.cpp
and spotc.c
files?
You need spot.hpp, spot.cpp and spotc.c
files only.
They're in the root project folder. Any other file is unneeded.
I link spot as library, sorry my bad, now I link spot as simple files of my proyect:
FILE(GLOB SpotFiles
deps/spot/spot.hpp
deps/spot/spot.c
deps/spot/spot.cpp
)
add_executable(
MyProyect
${SpotFiles}
${MainFiles}
)
And on my code:
#include "spot.hpp"
spot::image img = spot::image(dds.string().c_str());
img.save_as_jpg(out.c_str(), 100);
But still showing linking errors(LNK2019) on my proyect :( on this functions:
I don't know what its wrong now :/ my /deps/spot/ its a submodule of master of this repo, im building this on x64.
Don't rename spotc.c as spot.c. Try to keep the original name and tell me if it works :) In your current setup spot.c will get converted into spot.o once compiled, but then spot.cpp as spot.o again (hence, overwriting the previous C file and missing all the whole file you previously compiled)
Yes sorry, the fail its on "deps/spot/spot.c", i don't see that have a aditional "c" on his name, i renamed it to "deps/spot/spotc.c" and now the build it's fine ^^
A lot of thanks, I apreciate a lot your work, so usefull lightweight libraries for any proyect ^^
De nada xD
I tried to use spot on one of my proyects for convert .dds files to .jpg but I always get external simbols error on spot::color.
Any tip o idea to integrate this?