Photran says "At least one configuration should be available. Project cannot be created." when creating a fortran project in eclipse - eclipse

I downloaded Eclipse for Parallel Application Developers, Kepler version, on my Debian x64 system, as well as gfortran 4.7.2 from the repository. When I open Eclipse, I select File -> New -> Project -> Fortran Project, then select Executable -> Empty Project. After entering a project name and selecting the only toolchain available (Intel Fortran Toolchain on Intel 64) and clicking Next, I get to a window with an error message that says
At least one configuration should be available. Project cannot be created.
and I can't progress from there (the Finish button is greyed out). What am I doing wrong? How can I create a fortran project in Eclipse?

According to the user's guide, you should select Executable (GNU Fortran) and not Empty Project.

Related

Can not create 8051 project in Eclipse on Mac

I'm using macOS. I have downloaded sdcc for Mac and installed it followed INSTALL.txt inside the downloaded folder (simply copy it to Developer folder), and have Eclipse IDE for Embedded C/C++ Developer installed. Then I installed eclipseSDCC (I don't know if the plugin is platform specific). Seems everything in the right way.
However, when I new a project in Eclipse. I found the Toolchains is empty, so I can't create one. So, how can I deal with it?
Without knowing the prerequisites that renders a toolchain as "supported", these steps enables you to create an 8051 project:
Specify a project name.
Uncheck the checkbox at the bottom that reads "Show project types and toolchains only if they are supported on the platform".

Why does C++ "Hello World" require pthread (which is missing) in Eclipse Mars?

I've been running Eclipse Juno and MinGW 4.6.2 for a long time, but I need full C++11 support so I upgraded to Eclipse Mars and installed MinGW 4.9.3 in a different directory.
In Mars, linking any executable - even in the C++ Hello World project - results in "C:\MinGW_4_9_4\bin...\ld.exe: cannot find -lpthread."
The 4.6.2 directory (for Juno) contains pthread, but the 4.9.3 directory (for Mars) does not.
Why and How is Mars trying to link to pthread? (Can I turn it off?)
I couldn't determine if it's possible to link w/o pthread, but I'd noticed that pthread was not present after I installed (and re-installed w/maxmium options) MinGW 4.9.3. Maybe it's an installer bug?
In 2008, MinGW said "Use sourceware.org's pthreads-win32 at your own risk". I now see mingw-pthreads-win32 is a standard library in the MinGW Installation Manager Setup Tool (mingw-get.exe). I feel save with MinGW's purist attitude regarding Win-32, so I installed the library. Hooray - problem solved! ld.exe can now find -lpthread.
You can find the package in the MinGW Installation Manager Setup Tool, under "All Packages/MinGW/MinGW Libraries/MinGW Standard Libraries" in the left pane; it's the "mingw-pthreads-win32" package ("dev" class) in the right pane.

Eclipse on MAC OS X Does not detect LLVM toolchain

I'm trying to work with eclipse to compile/debug C/C++ applications on MAC OSX using LLVM/Clang.
I know I have the toolchain correctly installed as I can compile with it from the terminal using a makefile, and when running clang -v I get the LLVM version + install dir correctly.
I downloaded a fresh copy of eclipse C++ (Mars) + installed the LLVM support plugin and followed: Unable to install LLVM toolchain for Eclipse CDT
Copied the install dir path from the clang -v output to the LLVM part in the preferences -> c++ -> LLVM, but it seems eclipse does not detect the toolchain.
It does not appear as an option when creating a new C++ project unless I uncheck the "only show supported toolchains on the target" checkbox , and when I do uncheck it and create a LLVM project for MACOS in the build process it says:
Toolchain "LLVM with Clang (MacOSX)" is not detected.
Refer to "C/C++ Development User Guide", "Before you begin" how to install toolchains.
All it says in the manual is to install Xcode to get the toolchain running , which I obviously did as it is working from the terminal.
Any ideas? How does Eclipse detect the toolchain exists?
In Xcode app menu > Toolchains > set the one you want to use.
And set the environment variable export TOOLCHAINS=org.llvm.12.0.1. See the following steps to find the correct value of the env var.
If you just downloaded the compiler, headers etc., and no xctoolchain, then do this:
Copy /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain to ~/Library/Developer/Toolchains/
Delete the contents of ~/Library/Developer/Toolchains/XcodeDefault.xctoolchain/usr.
Either copy the share, libexec, lib, include, bin folders from the LLVM binaries to these locations inside ~/Library/Developer/Toolchains/XcodeDefault.xctoolchain/usr. Or you can create symlinks.
Edit the ~/Library/Developer/Toolchains/XcodeDefault.xctoolchain/ToolchainInfo.plist to change the Identifier to whatever you want.
Simply downloading the binaries doesn't make it a "toolchain" that Xcode expects like in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
Its highly likely this is fixed in latest version of Eclipse. At date this question was asked, you were using 'Mars'. This version of Eclipse is superseded by 'Neon' and then 'Oxygen' which is current as of end of January 2018. I've seen a reference to this issue being solved with 'Neon' edition as it was a bug in 'Mars'. I cannot personally confirm this though.
In addition if you manually installed clang/llvm instead of included apple version try using homebrew instead. There are some clear instructions here on using it under OSX/macOS in relation to clang/llvm.

Eclipse: no C/C++ option after installing CDT plugin

I use Eclipse to program in Java and , having already familiar with this development environment , I would use it for C/C++ projects.
Version: Eclipse SDK 4.2.2 (Juno)
O.S.: Ubuntu 12.04 LTS
I installed the CDT plugin by following the italian guide of the ubuntu documentation:
http://wiki.ubuntu-it.org/Programmazione/Eclipse#CDT
The only difference is that, at point 4, I have not included the source shown (Galileo), but the my version (Juno)
http://download.eclipse.org/tools/cdt/releases/juno
it's ok, found the source
CDT Main Features
CDT Optional Features
the installation is successful (indeed Eclipse show me CDT as the latest software installed, and an subsequent attempt to reinstall, Eclipse returns an error that it is already installed)
The problem is that when I restart Eclipse , I have no change. For instance , if I open the menu " File -> New -> Other" , I have no additional option to create a new C/C++ project.
I regularly installed on my computer the C/C++ compiler (gcc and g++ , version 4.6.3).
I also tried to install the plugin from the terminal:
sudo apt-get install eclipse-cdt
no change.
I search through the options in Eclipse to see if it was a problem enabling views of items in the menu, but nothing. Even in the "Window -> Preferences" I have no "C/C++" category .
I also changed my workspace ..... nothing .
Please help me, thanks
i had the same issue. i installed the latest eclipse, luna and mars. both had the c/c++ development tools.
my development environment had an older version of java installed, i.e. 1.6. apparently, luna/mars require 1.7 to be installed. i, at first, modified the eclipse.ini file to
-vmargs
-Dosgi.requiredJavaVersion=1.6
i started eclipse and the c/c++ project was not available. so i couldn't create a c/c++ project because it wasn't available in the wizard.
i updated my java to 1.7 on my machine; changed the eclipse.ini file back
-vmargs
-Dosgi.requiredJavaVersion=1.7
then started eclipse. viola. the option to create a c/c++ project is now available.
so basically, it seems that the newer eclipse requires 1.7 java. otherwise, it will disable features.
First of all, you have to open "C/C++ perspective". Try to go to menu "Window--Open Perspective -- Other--C/C++".
When you are in C/C++ perspective you should be able to create a new C/C++ project.
Also if you already have a loaded project, you can to convert to C++ project. Simply select it and then follow the right-click menu: "New" -- "Convert to a C/C++ Project (Adds C/C++ Nature)". Alternatively, simply go to menu File--New--Convert to C/C++ Project and it will show the list of all projects.
But again, the first and major step is to switch to C/C++ perspective.
Good luck!

How to build LLVM source code on Eclipse?

I am trying to add a new pass to the llvm compiler infrastructure.
I have been able to build LLVM-2.9 using make.But I wants to build using Eclipse
so that I can trace the code.
I imported llvm source files to c++ project with LinuxGcc tool chain
and CDT internal builder(Eclipse with CDT-7.0).But it gives some errors.
Is this is a right way to build llvm using eclipse?.
Please suggest me steps involved to build llvm source using Eclipse.
Note: Platform ubuntu.
Tools/versions used by me:
eclipse 4.3 Kepler, CDT 8.2.1
Oracle Java SDK 1.7.0_45
cmake 2.8.11.2
LLVM 3.5svn
Create a folder for CDT project files in your workspace. I.e. workspace/llvm.
Generate CDT project files with cmake (being in workspace/llvm):
cmake -G "Eclipse CDT4 - Unix Makefiles" -D_ECLIPSE_VERSION=4.3 ../../src/llvm
If eclipse version is not set the generator will assume 3.7 and inform you that it can be changed by CMAKE_ECLIPSE_VERSION option, what turns out to be the wrong name for that option.
Increase eclipse heap allocation size. The default setting is too small and C++ Indexer would hang the whole IDE. Replace default settings with
-Xms512m
-Xmx1024m
in eclipse.ini file.
Import the project into your workspace. File → Import... → General → Existing Projects into Workspace.
The project llvm can be built as one (option Build Project). There are also separated targets created for every lib and executable, placed in [Targets] folder. Individual target can be built with option Make Targets → Build...
You can use cmake -G"Eclipse CDT4 - Unix Makefiles" to produce the native Eclipse set of projects. It might require tweaking your CMakeLists.txt to remove the check for in-source builds (since Eclipse can only support project files and sources in the same directory, but for some reason the current CMakeLists allows it for MSVS only) - just follow the error messages.