| | |
Missing Library in Compiling
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Solved Threads: 0
When I try to compile
g++-4.2 memJpegDecoder.cpp
I get these errors.
I've tried linking the libjpeg files in /usr/lib, but it doesn't seem to be working. The header file that makes these calls can be found at https://setisvn.ssl.berkeley.edu/svn...glib/jpeglib.h. Please let me know if you have any questions.
g++-4.2 memJpegDecoder.cpp
I get these errors.
C++ Syntax (Toggle Plain Text)
/usr/lib/gcc/x86_64-linux-gnu/4.2.1/../../../../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /tmp/cci2IOXX.o: In function `memJpegDecoder::decompress()': memJpegDecoder.cpp:(.text+0x5b5): undefined reference to `jpeg_calc_output_dimensions' memJpegDecoder.cpp:(.text+0x68a): undefined reference to `jpeg_start_decompress' memJpegDecoder.cpp:(.text+0x6ac): undefined reference to `jpeg_read_scanlines' memJpegDecoder.cpp:(.text+0x730): undefined reference to `jpeg_finish_decompress' memJpegDecoder.cpp:(.text+0x739): undefined reference to `jpeg_destroy_decompress' /tmp/cci2IOXX.o: In function `memJpegDecoder::readHeader()': memJpegDecoder.cpp:(.text+0x756): undefined reference to `jpeg_read_header' /tmp/cci2IOXX.o: In function `memJpegDecoder::setSource(char*, long)': memJpegDecoder.cpp:(.text+0x79a): undefined reference to `jpeg_std_error' memJpegDecoder.cpp:(.text+0x7b7): undefined reference to `jpeg_CreateDecompress' memJpegDecoder.cpp:(.text+0x7c8): undefined reference to `jpeg_mem_src' collect2: ld returned 1 exit status
I've tried linking the libjpeg files in /usr/lib, but it doesn't seem to be working. The header file that makes these calls can be found at https://setisvn.ssl.berkeley.edu/svn...glib/jpeglib.h. Please let me know if you have any questions.
Last edited by nesalang; Jul 2nd, 2008 at 5:41 pm.
>>g++-4.2 memJpegDecoder.cpp
That is attempting to compile the *.cpp and create the executable program a.out. From the error message I assume that *.cpp file doesnot contain a main() function, which is required of all c and c++ executable programs.
That is attempting to compile the *.cpp and create the executable program a.out. From the error message I assume that *.cpp file doesnot contain a main() function, which is required of all c and c++ executable programs.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: May 2008
Posts: 10
Reputation:
Solved Threads: 0
I'm working on a different part of the same project with him. Hopefully I'll get a copy of his work within a day or two, but the main thing we're trying to do right now that's giving those errors is that the project builds correctly with cmake. We're trying to write our own make file for the entire project, so we're trying to get it to work with make instead of cmake. I'll be back when I get his part.
![]() |
Similar Threads
- libgpod3 + gtkpod (*nix Software)
- Strange crashing in windows, possible memory issues? (C)
- GTKpod (*nix Software)
- error C2375: 'my_strdup' : redefinition; different linkage (C++)
- Cannot Get Dev-C++ to compile correctly (C++)
Other Threads in the C++ Forum
- Previous Thread: Is this legal?
- Next Thread: c++ program
| Thread Tools | Search this Thread |
api array arrays based binary c++ c/c++ calculator char char* class classes code coding compile console conversion convert count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game generator givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






