From: Michele Portolan <michele.portolan@grenoble-inp.fr>
To: musl@lists.openwall.com
Subject: New to musl and C++ compiling
Date: Mon, 21 Jan 2019 11:24:12 +0100 [thread overview]
Message-ID: <cf42977c-9cc5-e94a-0942-05035f749d63@grenoble-inp.fr> (raw)
Hello,
I just installed MUSL because I have a C++ multithreaded application
that uses threads heavily and I would like to make it independent from
an OS. I was able to easily install and run MUSL for C targets, but when
I try a simple C++ Hello world I get an error for the standard libs.
My file is the simplest possible (no multithreading to start with):
#include <iostream>
int main() {
std::cout << "Hello, World" << std::endl;
return 0;
}
Here is my output for standard and musl-based compilation.
portolan@noumea:~/musl/examples$ g++ -o test_cpp test_cpp.cpp
portolan@noumea:~/musl/examples$ ./test_cpp
Hello, World
portolan@noumea:~/musl/examples$ g++ -o test_cpp test_cpp.cpp -specs
"/home/portolan/musl/install/lib/musl-gcc.specs"
test_cpp.cpp:1:11: fatal error: iostream: No such file or directory
#include <iostream>
^~~~~~~~~~
compilation terminated.
I am probably missing something REALLY basic, at least I hope so!
Best regards,
Michele
next reply other threads:[~2019-01-21 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 10:24 Michele Portolan [this message]
2019-01-21 11:53 ` Szabolcs Nagy
2019-01-21 12:02 ` Szabolcs Nagy
2019-01-21 13:13 ` Michele Portolan
2019-01-21 13:55 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf42977c-9cc5-e94a-0942-05035f749d63@grenoble-inp.fr \
--to=michele.portolan@grenoble-inp.fr \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).