can I compile & run Brew MP Applications without Sourcery G++ ARM Compiler?
Yes you can compile and run Brew MP application without an ARM compiler as long as you're just developing for the Brew MP Simulator
In order to run Brew MP applications on the simulator you will need a compiler that can generate X86 binaries. You can use Sourcery G++/X86 or Visual Studio/Express to do this.
To run the application on a device you will need an ARM compiler. You can use a GNU based compiler such as Sourcery G++ ARM compiler, a commercial ARM compiler, or any compatible ARM compiler for this purpose. But not all compilers are tested and supported.
Related
I have a relatively simple CMakeLists.txt that contains the following line(s):
target_compile_features(myapp PRIVATE
cxx_generalized_initializers
cxx_lambdas
cxx_nullptr)
When I run cmake on a Windows 2012 Server with MSVC++ 2013 Express installed, I get the following error:
CMake Error at CMakeLists.txt:61 (target_compile_features):
target_compile_features no known features for CXX compiler
"MSVC"
version 18.0.30723.0.
What is causing this error, and what can I do about it? CMake doesn't seem to have any problems when I build the project in Ubuntu 14.10 with GCC.
I am using CMake 3.1.0, in case that helps (it was the first CMake release to support target_compile_features).
CMake 3.1.0 only supports 'compile features' for GCC 4.7+ (on UNIX but not APPLE) and Clang (but not AppleClang) 3.4+.
CMake 3.2.0 will extend the support to GCC 4.4+ (on UNIX, including APPLE), AppleClang 4.0+ (Xcode 4.4+), SolarisStudio 12.4 and MSVC 2010+.
Patches and maintenance for other compilers can be sent to the cmake mailing list.
Make sure CMP0025 is NEW if you are on APPLE.
https://cmake.org/cmake/help/v3.6/command/cmake_policy.html
I am trying to make programs for an old computer running Windows 98 second edition, but they won't run.
The programs are written in c++, and they are compiled with MinGW (g++ version 4.8.1) installed on a Windows Vista computer. For testing I tried this simple Hello World program:
#include <iostream>
using namespace std;
int main(){
cout <<"hello world";
return 0;
}
For compiling I used this command:
g++ hello.cpp -o hello.exe
When trying to run this program on the Windows 98 computer I get the following message:
A required .DLL file, LIBGCC_S_DW2-1.DLL, was not found.
So to make the executable as independent of dll-files as possible, I tried compiling the program with the command:
g++ hello.cpp -static -o hello.exe
But on trying the program on the Windows 98 computer, I now get the message:
The hello.exe file is linked to missing export MSVCRT.DLL:_fstat64
To analyze the problem, I tried a few things. And I noticed that compiling the same code with the same command using g++ version 2.95.2 instead, the program was able to run on the Windows 98 machine. However, I would prefer not to use this old version of g++ as it contains a few problematic bugs.
I also noticed that a similar program made in regular c (compiled with gcc version 4.8.1) also worked fine on the old computer, but I would prefer not to use regular c as this would require rewriting a lot of c++ code.
So the question is: how can I make c++ programs compiled with g++ 4.8.1 (or later) run on a Windows 98 machine?
Late but better than never
found out later versions of MinGW doesn't run on windows 98 giving the error "A required .DLL file, LIBGCC_S_DW2-1.DLL, was not found."
the version of MinGW i tried and gave the error was this one (6.3.0-1)
(i think you are referring to the dev version there, probably the bin version you had was more modern)
oddly, i recalled that time ago i compilled a build using Code::Blocks using MinGW that ran in windows 98, so i downloaded Code::Blocks version 17.12, and compilled the very same exe using the MinGW provided there directly, and worked just fine
and noticed it was a fairly older version ((tdm-1) 5.1.0)
idk which was the latest version MinGW compilations worked on windows 98, i'll write a post about it in their forum soon
for the record, i'll show the pics of the test i did
on MinGW 6.3.0-1:
on MinGW (tdm-1) 5.1.0:
so, to answer the question; yes, you can make programs for windows 98 using MinGW's g++ greater than version 4.8.1 (up to a certain version, i'll ask in the forum for more information)
EDIT: no need to, found this:
"The default mode is C++98 for GCC versions prior to 6.1, and C++14 for GCC 6.1 and above. You can use command-line flag -std to explicitly specify the C++ standard. For example,
-std=c++98, or -std=gnu++98 (C++98 with GNU extensions)
-std=c++11, or -std=gnu++11 (C++11 with GNU extensions)
-std=c++14, or -std=gnu++14 (C++14 with GNU extensions), default mode for GCC 6.1 and above.
-std=c++17, or -std=gnu++17 (C++17 with GNU extensions), experimental.
-std=c++2a, or -std=gnu++2a (C++2a with GNU extensions), experimental."
i added the -std=c++98 -std=gnu++98 flags to the 6.3.0-1 compiler and it worked fine on Windows 98 SE
You can usually find msvcrt.dll by installing IE4
http://gnuwin32.sourceforge.net/packages/gcc.htm
I am compiling llvm v3.0 on a linux x86_64 on an intel double core and I would like to have some feedback on the optimization flags that need to be specified. I am compiling with gcc and I would start with '-O3', but I would like to know if there are any other flags that you recommend - maybe also architecture dependent.
thanks
In case you are going to use llvm on the same machine as you are compiling it, I suggest
-O3 -march=native -mtune=native
To enable all supported features of your cpu e.g. sse,avx,…
Anyone,
I have been unable to compile some packages, like WxWidgets, on Mac OS 10.6.4 using gcc 4.5 (compiled from source, not from MacPorts, Fink, etc. with all default languages and Obj-C++). Typically, when trying to compile against the Foundation framework, I get errors such as the following:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:123:35:error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:138:1:error: stray ‘#’ in program
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:139:1:error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token In file included from main2.m:2:0:
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:139:63:error: expected ‘;’ before ‘__attribute__’
I'm somewhat somewhat new developing on the Mac (more experience with Linux and Windows). Right now, I don't need to use Objective-C or Objective-C++. It's just getting in the way of being able to compile other packages (though I may want to start using it down the road). If anyone has any thoughts I would appreciate it. Thank you.
You...don't. GNU's GCC is not compatible with Apple's GCC in terms of Objective-C runtime support. You'll get the GNU Objective-C runtime which is the compatibility problem.
My strong suggestion to you is to not use C++0x features until the new standard is...a standard, and not a draft. Don't expect compiler support for draft features on all platforms.
On Lion, I was able to install gcc 4.7 using brew. I don't know if it will work on snow leopard.
You can try to install it from the homebrew-dupes container:
brew install --use-llvm --enable-cxx https://raw.github.com/Homebrew/homebrew-dupes/master/gcc.rb
Compiled gcc 4.7 successfully with c and c++ enabled on Lion.
I installed valgrind on Snow Leopard using the patch at https://bugs.kde.org/show_bug.cgi?id=205241 . However, when I run it with a binary I compiled from C++ code, I'm told that valgrind "cannot execute binary file". What g++ flags should I set to make my program work with valgrind?
Be sure to use the -m32 option to generate a 32-bit executable. The compiler default is 64-bit (assuming you have a 64-bit machine), but valgrind does not yet officially support 64-bit executables on Mac OS X. The file command on your executable should report "Mach-O executable i386".