Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile #1

Open
TamaMcGlinn opened this issue Jun 11, 2016 · 8 comments
Open

Doesn't compile #1

TamaMcGlinn opened this issue Jun 11, 2016 · 8 comments

Comments

@TamaMcGlinn
Copy link

carmen@serenity:~/code/empires/vtf2tga$ g++ -std=c++11 vtf2tga.cpp -lVTFLib13 Magick++-config --cppflags --cxxflags --ldflags --libs -o vtf2tga.exe
vtf2tga.cpp: In function ‘int main(int, char*)’:
vtf2tga.cpp:35:17: warning: variable ‘dstformat’ set but not used [-Wunused-but-set-variable]
VTFImageFormat dstformat;
^
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libVTFLib13.so: undefined reference to `tx_compress_dxtn(int, int, int, unsigned char const
, unsigned int, unsigned char*, int)'
collect2: error: ld returned 1 exit status

@tranek
Copy link
Owner

tranek commented Jun 11, 2016

Sounds like VTFLib13.so is missing a dependency. I am not sure what that is.

Unfortunately I'm not supporting this software anymore, sorry!

@Yepoleb
Copy link

Yepoleb commented Jul 23, 2016

It's a bug in VTFLib. I fixed it in this PR: panzi/VTFLib#7

@TamaMcGlinn
Copy link
Author

Thanks Yepoleb. It hasn't solved the issue for me, just changed the error to an ImageMagick problem - the underlying issue in this project is of not specifying the dependencies:

vtf2tga.cpp: In function ‘int main(int, char**)’:
vtf2tga.cpp:35:17: warning: variable ‘dstformat’ set but not used [-Wunused-but-set-variable]
  VTFImageFormat dstformat;
                 ^~~~~~~~~
/tmp/ccHZ35zq.o: In function `main':
/home/carmen/code/empires/vtf2tga/vtf2tga.cpp:71: undefined reference to `Magick::Image::read(unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MagickLib::StorageType, void const*)'
/home/carmen/code/empires/vtf2tga/vtf2tga.cpp:75: undefined reference to `Magick::Image::magick(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/carmen/code/empires/vtf2tga/vtf2tga.cpp:76: undefined reference to `Magick::Image::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status

@Yepoleb
Copy link

Yepoleb commented Sep 4, 2016

Can you show me the command line you used and the output of Magick++-config --version?

Edit: I just noticed tranek doesn't support this anymore, so maybe you want to try my vtf2tga inspired tool vtfconv.

@TamaMcGlinn
Copy link
Author

Magick++-config --version gives 1.3.20
Unfortunately, vtfconv gives similar undefined references.
identify --version shows I am running ImageMagick 6.8.9-9

@Yepoleb
Copy link

Yepoleb commented Sep 4, 2016

What's your distribution, so I can test on it?
Maybe Magick++-config --libscan give us a clue about what's wrong. My output is -lGraphicsMagick++ -lGraphicsMagick -ljbig -lwebp -llcms2 -ltiff -lfreetype -ljpeg -lpng16 -lwmflite -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread.
Running ldconfig as root often magically solves linker problems for me, you could try that too.

@TamaMcGlinn
Copy link
Author

$ Magick++-config --libs
-lGraphicsMagick++ -lGraphicsMagick -ljbig -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -lwmflite -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread

$ uname --all
Linux serenity 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux

(Debian 9)

sudo ldconfig output nothing, and vtfconv make still runs into undefined references (despite praying)

@Yepoleb
Copy link

Yepoleb commented Sep 7, 2016

I just compiled vtf2tga and vtfconv on a fresh install of Debian jessie and stretch. It worked flawlessly, aside from the testing installer being constantly broken. That means the problem is most likely with your environment, but I'm fine with helping you with that. If you want you can add me on Steam, so we can talk about it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants