Sponsored Content
Top Forums Shell Programming and Scripting C object code compatiblity with UNIX and Linux Post 302982184 by vivek chaudhary on Monday 26th of September 2016 06:44:32 AM
Old 09-26-2016
C object code compatiblity with UNIX and Linux

Is it possible to use an object code compiled on Unix- sun Os sparc on Redhat linux OS. In our new application we have to create object file on Unix os and then use the object code on Linux OS to compile pro*c code but when we are trying to achieve this we get error: file in wrong format. how can we achieve this functionality? Is it possible to use object code from unix on Linux?
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

“Ostream” object is not printing message on HP-UNIX for debug mode

The following C++ code segment is not working in debug mode build on HP-UNIX machine. It is not printing "Hello World" message on the screen. While it is working fine in release mode build. ============================================== class KLogStreamBuf : public streambuf { public:... (0 Replies)
Discussion started by: heena
0 Replies

2. Programming

Problem In Loading A Shared Object In Linux

Hi, We are trying to migrate our Solaris Soft OSE application to Linux. We use the dynamically linked options of the soft ose in our application. We are facing plenty of unresolved symbol problems while trying to load the ".so". These symbols are present in the libsoftose.a. for e.g ... (1 Reply)
Discussion started by: phani@tcs
1 Replies

3. UNIX for Dummies Questions & Answers

to make groupings of object using unix command

suppose u have a file 1 2 2 -3 2 2 -3 4 5 -2 -3 -4 -4 -2 1 1 1 so output should be lie that one for groupings... (1 Reply)
Discussion started by: cdfd123
1 Replies

4. Programming

How to modify this c code to get full GUI interface for Unix Linux ?

Hi, the following code comes from Unix Linux dialog utility project. Unfortunately, this project is no more actively maintained. Unix Linux dialog utility is made of widget boxes. One of them is mixedgauge.c In the following example I would like to get rid of flickering when run in... (0 Replies)
Discussion started by: jack2
0 Replies

5. UNIX for Dummies Questions & Answers

Object reference not set to an instance of an object

I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine. I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this. Here is my function: <?php function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies

6. Programming

help with C++ code that relate the object with physical address

I need some help to write a C++ code that read and write the register of a sequencer. I have to make a code that relate the objects with the physical address but I am a bit confuse. Could someone suggest me how to proceed? in which parts do I split the code? thanks (1 Reply)
Discussion started by: silviafisica
1 Replies

7. Shell Programming and Scripting

Creating CLOB object in unix

Hi All, I have a big file (basically .log file) want to store in oracle database. Please help me in preparing CLOB object in unix. The log file is stored in some location on unix file server, prepare clob of that file and store in DB. Any sample code or link Thanks Rajesh (1 Reply)
Discussion started by: rajeshorpu
1 Replies

8. Programming

How to initialize an object with another object of different class?

How to initialize an object of class say "A", with an object of type say "B". The following code give the error message "error: conversion from âAâ to non-scalar type âBâ requested" #include <iostream> using namespace std; class B; class A{ public: A() { cout <<"\nA()" << endl; } ... (1 Reply)
Discussion started by: techmonk
1 Replies
JOCAMLOPT(1)						      General Commands Manual						      JOCAMLOPT(1)

NAME
jocamlopt - The JoCaml native-code compiler SYNOPSIS
jocamlopt [ -acivS ] [ -cclib libname ] [ -ccopt option ] [ -compact ] [ -unsafe ] [ -o exec-file ] [ -I lib-dir ] filename ... jocamlopt.opt (same options) DESCRIPTION
The JoCaml high-performance native-code compiler jocamlopt(1) compiles Caml source files to native code object files and link these object files to produce standalone executables. The jocamlopt(1) command has a command-line interface very close to that of jocamlc(1). It accepts the same types of arguments and pro- cesses them sequentially: Arguments ending in .mli are taken to be source files for compilation unit interfaces. Interfaces specify the names exported by compilation units: they declare value names with their types, define public data types, declare abstract data types, and so on. From the file x.mli, the jocamlopt(1) compiler produces a compiled interface in the file x.cmi. The interface produced is identical to that produced by the bytecode compiler jocamlc(1). Arguments ending in .ml are taken to be source files for compilation unit implementations. Implementations provide definitions for the names exported by the unit, and also contain expressions to be evaluated for their side-effects. From the file x.ml, the jocamlopt(1) com- piler produces two files: x.o, containing native object code, and x.cmx, containing extra information for linking and optimization of the clients of the unit. The compiled implementation should always be referred to under the name x.cmx (when given a .o file, jocamlopt(1) assumes that it contains code compiled from C, not from Caml). The implementation is checked against the interface file x.mli (if it exists) as described in the manual for jocamlc(1). Arguments ending in .cmx are taken to be compiled object code. These files are linked together, along with the object files obtained by compiling .ml arguments (if any), and the Caml Light standard library, to produce a native-code executable program. The order in which .cmx and .ml arguments are presented on the command line is relevant: compilation units are initialized in that order at run-time, and it is a link-time error to use a component of a unit before having initialized it. Hence, a given x.cmx file must come before all .cmx files that refer to the unit x. Arguments ending in .cmxa are taken to be libraries of object code. Such a library packs in two files lib.cmxa and lib.a a set of object files (.cmx/.o files). Libraries are build with jocamlopt -a (see the description of the -a option below). The object files contained in the library are linked as regular .cmx files (see above), in the order specified when the library was built. The only difference is that if an object file contained in a library is not referenced anywhere in the program, then it is not linked in. Arguments ending in .c are passed to the C compiler, which generates a .o object file. This object file is linked with the program. Arguments ending in .o or .a are assumed to be C object files and libraries. They are linked with the program. The output of the linking phase is a regular Unix executable file. It does not need jocamlrun(1) to run. jocamlopt.opt is the same compiler as jocamlopt, but compiled with itself instead of with the bytecode compiler jocamlc(1). Thus, it behaves exactly like jocamlopt, but compiles faster. jocamlopt.opt is not available in all installations of JoCaml. OPTIONS
The following command-line options are recognized by jocamlopt(1). -a Build a library (.cmxa/.a file) with the object files (.cmx/.o files) given on the command line, instead of linking them into an executable file. The name of the library can be set with the -o option. The default name is library.cmxa. -c Compile only. Suppress the linking phase of the compilation. Source code files are turned into compiled files, but no executable file is produced. This option is useful to compile modules separately. -cclib -llibname Pass the -llibname option to the linker. This causes the given C library to be linked with the program. -ccopt option Pass the given option to the C compiler and linker. For instance, -ccopt -L dir causes the C linker to search for C libraries in directory dir. -compact Optimize the produced code for space rather than for time. This results in smaller but slightly slower programs. The default is to optimize for speed. -i Cause the compiler to print all defined names (with their inferred types or their definitions) when compiling an implementation (.ml file). This can be useful to check the types inferred by the compiler. Also, since the output follows the syntax of interfaces, it can help in writing an explicit interface (.mli file) for a file: just redirect the standard output of the compiler to a .mli file, and edit that file to remove all declarations of unexported names. -I directory Add the given directory to the list of directories searched for compiled interface files (.cmi) and compiled object code files (.cmo). By default, the current directory is searched first, then the standard library directory. Directories added with -I are searched after the current directory, in the order in which they were given on the command line, but before the standard library directory. -o exec-file Specify the name of the output file produced by the linker. The default output name is a.out, in keeping with the Unix tradition. If the -a option is given, specify the name of the library produced. -S Keep the assembly code produced during the compilation. The assembly code for the source file x.ml is saved in the file x.s. -v Print the version number of the compiler. -unsafe Turn bound checking off on array and string accesses (the v.(i) and s.[i] constructs). Programs compiled with -unsafe are therefore faster, but unsafe: anything can happen if the program accesses an array or string outside of its bounds. SEE ALSO
jocamlc(1). The Objective Caml user's manual, chapter "Native-code compilation". JOCAMLOPT(1)
All times are GMT -4. The time now is 08:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy