How to configure Xcode to compile not supported language, e.g. Fortran? - configuration

I would like to use Xcode under Mac OS X to compile and run a program written in a language that is not supported, e.g. Fortran. Assuming I have a compiler installed, e.g. gfortran or ifort, what are the steps in the Xcode project settings to make it possible to compile and run the program?
I have created an new, empty project since Fortran is not supported (only C,C++,Objective-C and Swift are selectable in a command line tool application). I created a simple Fortran file. But now I guess I have to add several things to the Builds tab in the project settings to make it compile and run (it works from the command line). What are these steps?

Add an external build system target to your project. External build system targets/projects let you build projects in languages Xcode doesn't natively support. The external build system target/project is in the Other section under OS X on the left side of the assistant. When you click the Next button, you'll be asked for the location of the build tool. Enter the path to your Fortran compiler. When you build the project, Xcode will use the Fortran compiler to do the building.

Related

How to bundle jre with .exe file created from .jar

I created .exe file from .jar file .Now my client demands to run the application without installing jre in the sytem.I have heard that with bundled jre it is possible ...but i dont know how to bundle jre with .exe file..
The JavaFX is working on this. Here are the up-coming features in Java SE 7 u10:
https://blogs.oracle.com/talkingjavadeployment/entry/packaging_improvements_in_jdk_7#3
https://blogs.oracle.com/talkingjavadeployment/entry/packaging_improvements_in_jdk_7
I have used VMware ThinApp to do exactly what you are trying to do. It does cost money, but works extremely well. It allows you to roll up all the dependencies your application uses into a single executable that can then run on vanilla installations of Windows. It can be used for a lot more than just Java, and it does so by recording the changes you make to a system after installing your application + the JRE for example, and then wraps up all of those changes. It certainly simplifies application deployment, since the applications are now portable. I've even used it to roll up Visual C++ redistributables, and .NET as well. This certainly increases the size of the executable, but it's also convenient knowing the application will run successfully. See more info at http://www.vmware.com/products/thinapp/overview.html.
The open source Launch4j allows you to produce an exe with an embedded JRE. This SO article also discusses this topic. Caveat: I've had very good success with Launch4j, but never used the embedded JRE feature.

How to compile using uclibc?

Hi all I have installed buildroot toolchain and am able to compile simple "Hello World" program which runs on uClibc based chroot. However I am confused how to do so for programs that use ./configure as how to ask it to use the uclibc based toolchain and not the glibc based toolchain present in my system.
My OS is Fedora and it is i386 based machine.I want to compile programs using uClibc for the same platform.
buildroot contains the package directory where there are numerous examples how to do it
Just set CC=PATH_TO_BUILDROOT_UCLIBC_GCC etc.
And you don't need to use chroot:
xxx/buildrootxxx/output/host/bin/xxxxx-gcc works fine, it would search the headers and libs in its own directory (like xxx/buildrootxxx/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/*)

Package Adobe Air to Exe

Using Flash Builder 4.6, I exported an Adobe Air file from my mobile project.
I'm trying to get it packaged into an EXE (that would include the Adobe Air Runtime)
The project was compiled with Air 3.1. I looked online and there are some ADT commands that people recommend using but the problem is that the command throws errors in Air 3.1
If i use air 3.0 ADT:
AIR file at [app path]/app.air could not be converted.
The error was ""
If I use air 3.1 or air 3.2 sdk
SDK is missing file [my path to air]\lib\nai\bin\naip.exe
I'm running
java -jar [path to air]\lib\adt.jar" -package -target native app.dmg app.air
I've also tried
java -jar [path to air]\lib\adt.jar" -package -target native app.exe app.air
I've also looked into projects like this one: http://bishoponvsto.wordpress.com/2010/02/23/adobe-air-2beta-2-to-exe-packaging-air-app-in-windows-executable/ , but it is for Air 2.0.
Any ideas? Apparently there is an integrated Flash Builder 4.6 tool, but for some reason the option under export release doesn't exist for mobile projects - strange...
Why do you want to do this? Air files -- when exported for a specific platform -- are executables.
If you are looking for an "installer" that will create directories, run the Air installation, and move auxiliary files to specific locations (docs, icons, etc.), then try Inno Setup.
EDIT:
The code you provided works for me to create a Windows EXE. But it seems a bit unecessary . . . why not just export the EXE file from Flash Builder ("Export Release Build" button in the top toolbar)? If you can't or won't, then here are some suggestions:
I am using Java version 1.6.0_29. Make sure your Java is not only up to date, but that you are actually calling the correct version (java -version).
Check the JAR directory text carefully .
Check that you are actually calling to the right Air version.
Make sure that the quotation marks are on both sides of the JAR path.
You should be able to do a "Export Release Build" (though I am using FB 4.5). Instead of selecting "Export as: Signed packages for each target platform", select "Export as: Signed AIR packages for installation on the desktop". (You may have to create a certificate, but you can create one through this export feature, too.)
(If you happen to be able to use the Flash IDE, the exported Air file has to support both "Desktop" and "Extended Desktop".)
Hopefully, this will allow you to both produce an Air program that can be converted to EXE, and actually convert it using the command line.
I know this question is a little old, but a co-worker just ran into the same error message using the command line tools and FlashDevelop. It turns out that he was accidentally packaging some source files into the .air package, an extra copy of the app descriptor and one of the swc's was getting packaged in the .air file. I removed those and repackaged the .air file, then used this command:
adt.bat -package -target bundle kiosk kiosk.air
This successfully created a captive runtime exe. Of course there's no need to create a .air file first, you can package right to native or captive runtime, but since my co-worker was creating .air files I did it that way too just to be sure it would work.

MySQL++ Application error at launch

I compiled MySQL++ with no issues. When I launched some of the executables (resetdb.exe and simple1.exe) they suggest to run to test if the installation has been successful, the first error I got was that libmysql.dll was missing.
Adding its path to the PATH environment variable did not fix the problem, even after launching a new command prompt; I had to copy the DLL in the directory where MySQL++ executables are.
Now the DLL is found, but I get this error:
simple1.exe - Application error
The application was unable to start correctly (0xc000007b).
Click OK to close the application.
even launching from the command line, I get no more information than these.
Thank you for any help!
MySQL 5.5 -
MySQL++ 3.0.9 -
Windows 7 64 bits -
MINGW32 -
GCC 4.4.0
0xC000007B is a Windows error that means the executable is corrupted. It could refer either to simple1.exe or to one of the DLLs it's linking against.
Some reasons this could happen:
You're mixing toolchains in an incompatible way. In your case, you may have built simple1.exe using pieces built by MinGW GCC and pieces built by Visual C++. MinGW should be compatible with any pure C DLL built by Visual C++, including the MySQL C API DLL. However, you may have other pieces interfering. MinGW isn't compatible with VC++ at the C++ level, but then, it shouldn't have linked at all if this were your problem.
You didn't follow the MySQL C API import library build steps in README-MinGW.txt. You either missed a step, or skipped it entirely and are trying to use the import library that shipped with MySQL.
In your previous gyrations, you ended up with a corrupt object file, which got linked in. Try saying make clean all at the top level of MySQL++ to force a complete rebuild.
You're mixing versions of MySQL or MySQL++. If you have more than one version of each on the system, make sure you're consistent in their use. That is, build the C API import library from the same DLL you run the programs against, use exrun.bat to run the examples to ensure you're using the just-built version of the MySQL++ DLL instead of another you have in your PATH, etc.
Additionally, I note that you're using an older version of MySQL++. If you were on Linux, I could understand that as some distributions still ship with 3.0.9. But since you have to build MySQL++ from source with MinGW, I don't see why you're not using 3.1.0. Did you get a binary build from somewhere?
As for your PATH problem, did you restart the MinGW shell after doing this? PATH updates don't affect running programs; they keep the value they saw when they started.

error in CUDA compilation

I'm getting this error while trying to run sample codes in CUDA SDK. I have CUDA 2.3 and Visual studio 2008
LINK : fatal error LNK1181: cannot open input file 'cutil32D.lib'
Any pointers how to solve this?
Since you're compiling the SDK samples, the project files are probably correct. Far more likely is that you haven't built the cutil library. Go to the SDK install directory, then into the "C" directory. You'll see a "common" directory, in there open the cutil.sln solution (or cutil_vc90.sln for VS2008) and build it in release and debug modes for your platform.
Then try your sample again.
The cutil library is used to avoid replicating the same code through all the samples, if you're starting your own project I'd avoid reusing the cutil library and write your own checker. For example, you should probably fail gracefully if you detect a CUDA error rather than just calling exit() as done in cutil.
The cuda.rules file included in the SDK is highly recommended! Using this you can just add .cu files to any project and Visual Studio will know how to compile them and link them in to the final executable. Easy!
Your MSVC project needs to include the library cutil32D.lib to link. Once you specify it as a library the linker needs to include in the final binary artifact this problem will go away. It would seem the library is missing at the location the linker is going to look for it. You'll have to change the library search paths or move that file to a directory in which the linker is already looking.
I ran into the same issue. It turned out not only did I need to build the cutil project but also the shrUtils project under the SDK's shared folder.