Sunday, April 26, 2015

Digest for comp.lang.c++@googlegroups.com - 4 updates in 3 topics

bilsch01 <king621@comcast.net>: Apr 25 07:09PM -0700

On 04/22/2015 05:16 PM, Jens Thoms Toerring wrote:
> you have to get the 64-bit version of the libraries not
> found.
> Regards, Jens
 
Thanks for your comment. I started using Ubuntu on an older desktop.
When I got this laptop (64 bit) I used the same CD to install Ubuntu
(32-bit) on the laptop and never thought twice about it. As a result of
your post I have now upgraded to Ubuntu 14.04 64-bit. Alas, I have the
same problem compiling and linking the job.
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Apr 26 04:19PM -0600

On Wed, 22 Apr 2015 22:32:25 +0000 (UTC), bilsch <king621@comcast.net>
wrote:
 
>06_loading_a_texture
>/usr/bin/ld: cannot find -ldevIL
>collect2: error: ld returned 1 exit status
 
It sounds as if libdevIl.so (or libdevIl.a, if you're linking
statically) isn't in the linker's library search path. You might try
getting verbose output from the linker by adding "-Wl,-v" to your
compile command; it should tell you which directories it's searching
for libraries. These will be directories will be prefixed by "-L".
 
If libdevIl.so (or libdevIl.a) is in a directory that the linker isn't
searching, you'll probably have to add your own -L<directory name> to
the compile command.
 
Louis
woodbrian77@gmail.com: Apr 26 03:17PM -0700

http://stackoverflow.com/questions/29882666/c-socket-programming-read-write
 
Is limiting the size of the read the problem as EJP suggests?
I was thinking it might have to do with the OP's assuming int is 4 bytes.
 
I have a C++ library that helps with transferring files between
clients and server -- http://webEbenezer.net/build_integration.html
 
Brian
Ebenezer Enterprises - "America did not create religious
liberty, religious liberty created America." Bobby Jindal
 
http://webEbenezer.net
Robbie Hatley <see.my.sig@for.my.address>: Apr 25 10:20PM -0700

On 4/24/2015 6:13 AM, Melzzzzz wrote:
 
 
>> Compilation attempt with g++ gives these errors:
 
>> %g++ -Wall -std=c++11 program.cpp -o program.exe
 
> You need -std=c++14 switch !
 
 
Scroll down. This was already covered in the part you erased
before replying:
 
 
Compilation attempt with g++ gives these errors:
 
%g++ -Wall -std=c++11 program.cpp -o program.exe
 
weird-program.cpp: In function 'int main()':
weird-program.cpp:16:7: error: 'make_unique' is not a member of 'std'
std::make_unique<std::string> ("string");
^
weird-program.cpp:16:35: error: expected primary-expression before
'>' token
std::make_unique<std::string> ("string");
^
weird-program.cpp:18:30: error: request for member 'find' in
'("examples")', which is of non-class type 'const char [9]'
std::cout << ("examples").find('x') << std::endl;
^
 
Hmmm. Function "make_unique" *should* be in header <memory>.
Ah, I see, I'm compiling with std=c++11, but I need std=c++14. <<< HERE
 
Then you need to rethink your usage of "find" a if it were
a method of a string literal. String literals don't have
methods. But std::string does, so i'll make that correction
for you. Yes, THIS version compiles:
 
#include <initializer_list>
#include <iostream>
#include <ostream>
#include <string>
#include <regex>
#include <thread>
#include <memory>
void alpha() {
std::cout << "alpha\n";
}
int main(void)
{
std::unique_ptr<std::string> s =
std::make_unique<std::string>("string");
std::regex pat {R"(\w{2}\s*\d{5}(-\d{4})?)"};
std::cout << std::string("examples").find('x') << std::endl;
std::thread t(alpha);
t.join();
return 0;
}
 
%g++ -Wall -std=c++14 program.cpp -o program.exe
 
[no errors, no warnings]
 
On running, prints:
 
1
alpha
 
 
 
 
 
--
Cheers,
Robbie Hatley
Midway City, CA, USA
perl -le 'print "\154o\156e\167o\154f\100w\145ll\56c\157m"'
http://www.well.com/user/lonewolf/
https://www.facebook.com/robbie.hatley
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: