Request for build feedback

W

woodbrian77

I have access to Linux machines and a couple of Windows 7
machines. I'd like to know how this software

http://webEbenezer.net/misc/direct.tar.bz2 (*)

builds, especially on systems that I don't have like
Solaris, HP, Windows 8, etc.

A C++ compiler with support for the 2011 standard is
needed. VS 11 might work. VS 12 does here.

There's a Readme file in the archive which tells about
the makefiles in the archive. There's a separate
makefile for Windows. On Windows a library and one
executable are built. On Linux the same library and
executable are built plus a second executable is built.

The file to download is 21,059 bytes at this time so
downloading it shouldn't take long. On my Linux system
the library and two programs build in 9 seconds. If
everything goes well, the downloading, tar xf direct.tar.bz2,
and building should take less than a minute.

I'd like to know if it does or doesn't build on your
system. If you prefer to send an email, that would be
fine.

Feel free to keep the software if you like. However, two
of the files in the archive are from another developer
and should only be used in conjunction with the rest of
the software. Those files are quicklz.h and quicklz.cc.
See http://quicklz.com for more info.

Thank you in advance.

Brian
Ebenezer Enterprises - Learning how to walk on economic water.
http://webEbenezer.net

(*) More info here
http://webEbenezer.net/build_integration.html
 
W

woodbrian77

The file to download is 21,059 bytes at this time so
downloading it shouldn't take long. On my Linux system
the library and two programs build in 9 seconds.

I guess it's more like 7 seconds here.
I'd like to know if it does or doesn't build on your
system. If you prefer to send an email, that would be
fine.

woodbrian77 at gmail.com
 
W

woodbrian77

In the thread "History of and support for std::basic_string::back()",
Öö Tiib wrote:

"Unfortunately C++ does not define anything of it;
it does not even have modules yet. Do not you see we have nothing?
Our API with environment is: parameters of 'main', 'cin', 'cout',
'cerr', 'clog', 'system("pause")' and return value of 'main'. ;-( "

If you agree with that thinking, please consider helping me
with this as far as finding out how the software builds on
other systems. If it doesn't build on a system you have,
I'll do what I can to fix that, including possibly installing
that system on one of my machines.
 
W

woodbrian77

4==argc ? 55555: ::std::strtol(argv[4],nullptr,10)

I tried writing that without the space between the colons:

4==argc ? 55555:::std::strtol(argv[4],nullptr,10)

But both clang and gcc don't like it.

direct.cc:47:48: error: expected ':'
,4==argc ? 55555:::std::strtol(argv[4],nullptr,10)
^
:
direct.cc:47:41: note: to match this '?'
,4==argc ? 55555:::std::strtol(argv[4],nullptr,10)
^
direct.cc:47:50: error: expected unqualified-id
,4==argc ? 55555:::std::strtol(argv[4],nullptr,10)
^
------------------------------------------------------------------

I'm wondering if it is a bug with the compilers or
if it's required to have a space in this case.


If you have a minute or two, please let me know how the
software described up thread builds on your machine.
I did get a report that the software built fine on OSX 10.8.
 
B

Barry Schwarz

4==argc ? 55555: ::std::strtol(argv[4],nullptr,10)

I tried writing that without the space between the colons:

4==argc ? 55555:::std::strtol(argv[4],nullptr,10)

But both clang and gcc don't like it.

direct.cc:47:48: error: expected ':'
,4==argc ? 55555:::std::strtol(argv[4],nullptr,10)
^
:
direct.cc:47:41: note: to match this '?'
,4==argc ? 55555:::std::strtol(argv[4],nullptr,10)
^
direct.cc:47:50: error: expected unqualified-id
,4==argc ? 55555:::std::strtol(argv[4],nullptr,10)
^

When the compiler is parsing the source into tokens, it is required to
go as far as possible (an approach called maximum munch). The
compiler must include the next character in the current token if doing
results in a valid token. The classic example is
a = b+++c;
The compiler is required to process this as
a = b++ + c;
and not
a = b + ++c;

In your case
4 == argc ? 55555: ::std...
is a well formed example of the conditional operator. But
4 == argc ? 55555:::std...
must be processed as
4 == argc ? 55555:: :std...
and obviously 55555:: is not a valid expression nor is :std...
 
I

Ian Collins

Using ::std says we are talking about top-level std
and not another sub namespace that happens to also
be called std.

There shouldn't be another namespace called std.
 
W

woodbrian77

When the compiler is parsing the source into tokens, it is required to
go as far as possible (an approach called maximum munch). The
compiler must include the next character in the current token if doing
results in a valid token. The classic example is

a = b+++c;

The compiler is required to process this as

a = b++ + c;

and not

a = b + ++c;

What about templates and > ?
It's not required to have a space between >'s
in 2011 C++:

::std::deque<::std::deque<int>> hi;

That seems to be an exception to maximal munching.
 
V

Victor Bazarov

What about templates and > ?
It's not required to have a space between >'s
in 2011 C++:

::std::deque<::std::deque<int>> hi;

That seems to be an exception to maximal munching.

Why? No exception. It eats both > symbols as a single token and then
the compilation allows using it to close two opening angle brackets at
the same time. Of course if you had a template

template<int i> struct myT { bool operator >(int) const; };

you can't write

int i;
myT<42>> i;

because the >> is interpreted as a double closing bracket and not as two
separate tokens: one closing bracket and one operator greater-than sign.
Probably. I didn't try it.

V
 
I

Ike Naar

That and $5 will get you a cup of coffee.

You are using ::std (instead of plain std) in contexts where there
is no way that another std namespace than the global one can apply.
 
W

woodbrian77

You are using ::std (instead of plain std) in contexts where there
is no way that another std namespace than the global one can apply.

namespace vv {
namespace std {

template <class T>
class vector
{
int a;
};

}
}

using namespace vv; // This could be in a header somewhere.

int main()
{
std::vector<int> nn;
}


clang++ 3.3 accepts that with no warnings. G++ 4.8.1 gives errors.
 
I

Ian Collins

namespace vv {
namespace std {

template <class T>
class vector
{
int a;
};

}
}

using namespace vv; // This could be in a header somewhere.

Could be, but it would be a really evil thing to do.
int main()
{
std::vector<int> nn;
}


clang++ 3.3 accepts that with no warnings. G++ 4.8.1 gives errors.

Clang appears to be wrong, std:: is ambiguous in this context.
 
V

Victor Bazarov

Could be, but it would be a really evil thing to do.


Clang appears to be wrong, std:: is ambiguous in this context.

Why would it be ambiguous? There is no #include <vector> ...

V
 

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

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top