macros.h, where is it?

J

jing

hi all. i need to compile a sourcecode package in c++ download from an
edu. site.
here is what has happened
#make all
cd generate; make
make[1]: Entering directory `/home/dpr/generate'
g++ -c -O3 -DUNIX gen.cpp
In file included from /usr/include/c++/3.2.2/backward/fstream.h:31,
from gen.h:13,
from gen.cpp:10:
/usr/include/c++/3.2.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 <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.
gen.cpp:20:20: macros.h: no such file or directory found
gen.cpp: In function `void OutTime(std::eek:stream&, float)':
gen.cpp:166: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp: In function `void AdvTime(std::eek:stream&, float)':
gen.cpp:179: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp: In function `void OutSelect(std::eek:stream&, float*, float*,
float,
float, float*)':
gen.cpp:223: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*&, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:224: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*&, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:225: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:226: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:227: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*&, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
make[1]: *** [gen.o] Error 1
make[1]: Leaving directory `/home/dpr/generate'
make: *** [all] Error 2

it seems that macro.h is missing, but i can't found it in the source
directory nor /usr/include/g++-3.
any help would be most appreciated.
 
B

Bob Hairgrove

it seems that macro.h is missing, but i can't found it in the source
directory nor /usr/include/g++-3.
any help would be most appreciated.

I'll help you find it if you can tell me where I mislaid my key to the
laundry room...I've been looking all over for it! :)

At any rate, it's not one of the standard C++ headers, so you can stop
looking in the g++ directory for it.
 
M

Mike Wahler

Bob Hairgrove said:
I'll help you find it if you can tell me where I mislaid my key to the
laundry room...I've been looking all over for it! :)

std::cout << "The key to laundry room access is to wait "
"until someone else enters, and walk in "
"before the door closes.\n" /* :) */

[sorry. :)]


-Mike
 
J

jing

maybe the header file hasn't been packaged for somehow, is there anyone
who might have an interest to write macros.h by himself/herself. i'm a
novice in c++, so i'm afraid i can't make it myself. BUT i need it
desirably!
any help would be appreciated.
 
K

Kai-Uwe Bux

jing said:
maybe the header file hasn't been packaged for somehow, is there anyone
who might have an interest to write macros.h by himself/herself. i'm a
novice in c++, so i'm afraid i can't make it myself. BUT i need it
desirably!
any help would be appreciated.

How would anybody be able to do that? By the name of the file alone, one
cannot predict what has to go in there? Also, this filename is not really
giving a clue: a quick search on my machine revealed that I have at least 4
different files called macros.h, none of which is likely to help you.

May I suggest you contact the people whose program you are trying to build.
They are the only ones who can help you.


Best

Kai-Uwe Bux
 
J

John Harrison

jing said:
hi all. i need to compile a sourcecode package in c++ download from an
edu. site.
here is what has happened
#make all
cd generate; make
make[1]: Entering directory `/home/dpr/generate'
g++ -c -O3 -DUNIX gen.cpp
In file included from /usr/include/c++/3.2.2/backward/fstream.h:31,
from gen.h:13,
from gen.cpp:10:
/usr/include/c++/3.2.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 <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.
gen.cpp:20:20: macros.h: no such file or directory found
gen.cpp: In function `void OutTime(std::eek:stream&, float)':
gen.cpp:166: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp: In function `void AdvTime(std::eek:stream&, float)':
gen.cpp:179: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp: In function `void OutSelect(std::eek:stream&, float*, float*,
float,
float, float*)':
gen.cpp:223: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*&, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:224: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*&, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:225: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:226: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
gen.cpp:227: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::write(float*&, unsigned int)'
/usr/include/c++/3.2.2/bits/ostream.tcc:387: candidates are:
std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::write(const _CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
make[1]: *** [gen.o] Error 1
make[1]: Leaving directory `/home/dpr/generate'
make: *** [all] Error 2

it seems that macro.h is missing, but i can't found it in the source
directory nor /usr/include/g++-3.
any help would be most appreciated.

Looking at the above error messages your problems are much bigger than
just a missing header file.

It sounds to me like you have got hold of some code from somewhere and
you are trying to compile it and find that you can't. Probably this
means that you are using the wrong compiler. For instance I have a file
called macros.h but it is for the VC++ compiler not the g++ compiler.
Since you do not know any C++ your only realistic option is to find out
what compiler you are meant to use and use that.

john
 
J

jing

Yes u r right. i'm now trying to find someone who can build the final
demo platform for research use. we need it!!!
thank u

jing
 
J

jing

i've tried gcc 3.2.2 and 3.2.3, and there is no hint in the package
indicating which version of complier should be used. the following is
selected from README

To compile all source code run make in the main directory. Four
separate makes will be invoked---one for building libGiST, one for
building libxfig, one for building the experimental testbed (directory
index), and one for building the workload generator (directory
generate). For successful build, it may be necessary to update the
paths of include and library directories in the Makefiles (macro
definitions INCS and LIBS). The source code should be compilable with
GNU C++. The source code, as is, is not guaranteed to compile with any
other C++ compilers.

jing
 
J

John Harrison

jing said:
i've tried gcc 3.2.2 and 3.2.3, and there is no hint in the package
indicating which version of complier should be used. the following is
selected from README

To compile all source code run make in the main directory. Four
separate makes will be invoked---one for building libGiST, one for
building libxfig, one for building the experimental testbed (directory
index), and one for building the workload generator (directory
generate). For successful build, it may be necessary to update the
paths of include and library directories in the Makefiles (macro
definitions INCS and LIBS). The source code should be compilable with
GNU C++. The source code, as is, is not guaranteed to compile with any
other C++ compilers.

jing

I've had a good look at the code and it is a long way from being valid
C++. There are lots and lots of different problems. You either need a
C++ expert who can help you fix the code or you need to find the exact
version of g++ you need, I'd guess that you would have better luck with
2.95.

john
 
J

jing

thank u john. but finding a c++ expert...for me this is another
impossible mission! :-(
and that's why i post here for help.
u r familiar with gcc 2.95? i'll have a try.

jing
 
J

John Harrison

jing said:
thank u john. but finding a c++ expert...for me this is another
impossible mission! :-(
and that's why i post here for help.
u r familiar with gcc 2.95? i'll have a try.

jing

I'm not very familar with it, but it was the last version of the g++
compiler before C++ was standardized. The code you are looking at is
pre-standard C++ as well as a certain amount of non-standard C++.

John
 
J

jing

i see thank u John. i've emailed to (e-mail address removed) who is responsible
for the questions concerning the sourcecode package for help. according
to README, the code was written several years ago, i'm wondering if
there is an upgraded one.

jing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top