Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,338 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,104 people online right now. Registration is fast and FREE... Join Now!




error while compiling .cc file

 
Reply to this topicStart new topic

error while compiling .cc file

mjain
post 30 Mar, 2008 - 03:48 AM
Post #1


New D.I.C Head

*
Joined: 30 Mar, 2008
Posts: 2

hi all ,
while compiling md5.cc file for md5 algorithm in fedora 7 i got the following errors . i am unable to figure out the problem please do tell me the solution to remove the bug as soon as possbile..
[root@localhost md5-cc]# gcc md5.cc
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/fstream.h:31,
from md5.hh:43,
from md5.cc:48:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
md5.cc: In member function ‘void MD5::update(std::istream&)’:
md5.cc:149: error: invalid conversion from ‘char*’ to ‘unsigned char*’
md5.cc:149: error: initializing argument 1 of ‘void MD5::update(unsigned char*, unsigned int)’
md5.cc: In member function ‘void MD5::update(std::ifstream&)’:
md5.cc:168: error: invalid conversion from ‘unsigned char*’ to ‘char*’
md5.cc:168: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::read(_CharT*, std::streamsize) [with _CharT = char, _Traits = std::char_traits<char>]’

waiting for response
thanks
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 30 Mar, 2008 - 04:49 AM
Post #2


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,170



Thanked 33 times

Dream Kudos: 25
My Contributions


We'll need to see your code, but on first glance it appears you have included unsupported non standard or deprecated header files in your project. If you post the code, we can tell for sure.
User is offlineProfile CardPM

Go to the top of the page

Public_account
post 2 Apr, 2008 - 02:13 PM
Post #3


New D.I.C Head

*
Joined: 16 Feb, 2007
Posts: 17


My Contributions


QUOTE(Amadeus @ 30 Mar, 2008 - 05:49 AM) *

We'll need to see your code, but on first glance it appears you have included unsupported non standard or deprecated header files in your project. If you post the code, we can tell for sure.


I have the same problem when trying to compile the same thing under Ubuntu 7.10 amd64.

The source comes from here under the "C++" header.

As you understand, I too would be very greatful if some advice on how to get it to compile could be provided.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/22/08 03:31AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month