How to compile .so with gcc?

I want to make a .so file (library for linux). How could I compile with gcc to have this output. My input file is in .c.
Thanx

gcc -I/$JAVA_HOME/include -I/$JAVA_HOME/include/linux -shared myCfile.c -o libMYLIB.so
//Anders ;-D

Similar Messages

  • OCCI compilation issue with gcc-3.2.3 on Red Hat ES 2.1

    Hello,
    If I use OCCI of Oracle 10g and try to compile it with gcc-3.2.3 on Red Hat ES 2.1, I get linking errors.
    The same works if I try to compile OCCI on Red Hat ES 3.0.
    Any clues about how to compile the OCCI on RedHat ES/AS 2.1?

    Yes, I downloaded the OCCI for gcc-3.2.3.
    As I said it works on Red Hat 3.0.
    I want to compile it on Red Hat ES 2.1.
    I have installed gcc-3.2.3 on Red Hat ES 2.1. But the occi compilation wont succeed onto it.

  • How to compile forms with JDAPI ?

    Hi everyone:
    I have more than 200 forms need to compile. All the forms have libraries, object groups attached, they also call stored procedures in the database.
    When I run this code :
    FormModule frm= (FormModule) JdapiModule.openModule("/tmp/"+fileName);
    frm.compile();It reports error like this :
    Exception in thread "main" oracle.forms.jdapi.JdapiStatusException: _jni_compile_form failed
         at oracle.forms.jdapi.BaseAPI._jni_compile_form(Native Method)
         at oracle.forms.jdapi.FormModule.compile(Unknown Source)
         at oracle.forms.developer.JDAPIFormsApi.attachObject(JDAPIFormsApi.java:54)
         at oracle.forms.developer.JDAPIFormsApi.main(JDAPIFormsApi.java:71)Through forms builder, I need to connect to database, put all libraries and resources in the folder included in FORMS_PATH, to get them compiled.
    But how to compile them with all prerequisite conditions set up in my java code ?

    An easier way would be to compile the forms via script, there are several examples on the forum.

  • [solved] unable to compile mame with gcc 4.7.2

    I tried to compile mame :
    http://mamedev.org/downloader.php?file= … e0147s.zip
    but it doesn't work, it fails with gcc 4.7.2 :
    Compiling src/emu/cpu/tms32051/tms32051.c...
    Generating TMS57002 source file...
    obj/sdl/build/tmsmake src/emu/cpu/tms57002/tmsinstr.lst obj/sdl/emu/cpu/tms57002/tms57002.inc
    Compiling src/emu/cpu/tms57002/tms57002.c...
    {entrée standard}: Messages de l'assembleur:
    {entrée standard}:3066: Avertissement: fin du fichier n'est pas à la fin de la ligne; nouvelle ligne insérée
    {entrée standard}: Erreur: ouverture CFI à la fin du fichier; directive .cfi_endproc manquante
    gcc: erreur interne du compilateur: Processus arrêté (program cc1plus)
    Veuillez soumettre un rapport complet d'anomalies,
    avec le source pré-traité si nécessaire.
    Consultez <https://bugs.archlinux.org/> pour plus de détail.
    make: *** [obj/sdl/emu/cpu/tms57002/tms57002.o] Erreur 4
    I want to know how the official packager ( Sergej Pupykin ) succeeded to compile mame ? ( sdlmame package ) :
    https://www.archlinux.org/packages/comm … 6/sdlmame/
    Do I need an older version of gcc ?
    Last edited by Potomac (2012-12-21 20:07:28)

    I found a solution by installing an older version of gcc ( 4.4.5 ) and I can compile now mame,
    it's a known problem about gcc and mame, the source code is not compatible with gcc 4.7.2 ( and even with some older releases ) :
    http://forums.gentoo.org/viewtopic-t-84 … 0473b82412
    check the first comment here ( padremayi ), same error :
    https://aur.archlinux.org/packages/sdlm … setlang=fr
    the solution is to use gcc 4.4.5 version,
    you need also to patch one file in gcc 4.4.5 :
    --- gcc/config/i386/linux-unwind.h 2009-04-10 01:23:07.000000000 +0200
    +++ gcc/config/i386/linux-unwind.h 2012-12-21 03:10:27.000000000 +0100
    @@ -133,9 +133,9 @@
    struct rt_sigframe {
    int sig;
    - struct siginfo *pinfo;
    + siginfo_t *pinfo;
    void *puc;
    - struct siginfo info;
    + siginfo_t info;
    struct ucontext uc;
    } *rt_ = context->cfa;
    /* The void * cast is necessary to avoid an aliasing warning.
    edit : the solution was to increase ram memory in virtualbox, with gcc 4.7.2 and 1.5 Gb ram I can compile mame without errors, but with 1 Gb ram the error occurs
    maybe it's a bug in gcc 4.7.2 ( because with gcc 4.4.5 I don't need to increase ram )
    Last edited by Potomac (2012-12-25 12:09:52)

  • How to compile swf with ANT en ASC 2.0?

    He All,
    I used to compile a swf in Flash builder with this antscript below. But mxmlc in not supported anymore. Any idea how to compile the swf with ASC 2.0?
    <target name="compile.apple" depends="clean.apple">
      <echo message="Compiling swf"/>
      <mxmlc file="${app.projectfile}" output="${app.rootfile}" optimize="true" configname="airmobile" debug="false">
      <load-config filename="${app.rootdir}/resources/ant/build.config"/>
      <source-path path-element="${flex.sdkPath}/frameworks"/>
      <source-path path-element="${app.sourcedir}"/>
      <source-path path-element="${app.rootdir}/libs"/>
      <static-link-runtime-shared-libraries/>
      <compiler.library-path dir="${flex.sdkPath}/frameworks" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      <arg line="-swf-version=17" />
      <arg line="-define=CONFIG::debug,false" />
      <arg line="-define=CONFIG::device,true" />
      <arg line="-define=CONFIG::local.false" />
      <compiler.library-path dir="${app.rootdir}" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      </mxmlc>
      </target>

    He Peter,
    Thanks for your reply. I've made some steps, but still no perfect solution. I've managed to compile a swf with ant using only the AIR SDK.
    But, check these results
    - Compiled using Flash Builder release : 455 kb
    - Compiled with ant using mxmlc : 104 kb
    - Compiled with ant using compc : 139 kb
    Can you provide us an example, how to compile a swf using ant. For example, with an AIR mobile project.
    Thanks Peter.
    Tim.

  • How to compile less with Dreamweaver in windows?

    i have Dreamweaver cs6 and i am trying to compile it with less , i have watched several tutorial on YouTube but most of them for Mac users not for windows users :/
    some videos suggest to change files inside dreamweaver like "extensions txt" but it's not working as well , Any help please ?

    http://www.dmxzone.com/go/21526/dmxzone-less-css-compiler-released-and-for-free/

  • How to compile mplayer with giflib support?

    Hey all,
    i am trying to compile mplayer (or mplayer2, i have tried several pkgbuilds from aur), as the package from extra doesn't have support for the the gif89a video_out driver. I have giflib package installed, so i have the /usr/lib/include/gif_lib.h in my filesystem. If i try to compile mplayer with the ./configure --enable-gif option, it fails with the following error message:
    libmpdemux/demux_gif.o: In function `demux_close_gif':
    demux_gif.c:(.text+0x39): undefined reference to `PrintGifError'
    libmpdemux/demux_gif.o: In function `demux_open_gif':
    demux_gif.c:(.text+0x293): undefined reference to `PrintGifError'
    libmpdemux/demux_gif.o: In function `demux_gif_fill_buffer':
    demux_gif.c:(.text+0x95b): undefined reference to `PrintGifError'
    demux_gif.c:(.text+0xb1a): undefined reference to `PrintGifError'
    ...among others, because some other libraries (cdio_paranoia, theora and caca) have undefined references too. If i check the source of giflib, i see the missing function 'PrintGifError' in 'lib/gif_err.c', but i don't have this file on my filesystem. My question is from where should i obtain these sources, and where i need to place them to compile mplayer successfully?
    Update: here is the whole list of errors, all of them are undefined references to various functions: http://pastebin.com/LttqXy5J
    Last edited by vizipok (2013-06-03 11:53:20)

    sl1pkn07 wrote:why this downgrade
    Because there's lotsa compilation fails caused by the giflib API changing.

  • Compilation problem with GCC 3.3.2 in solaris 10

    Hi,
    Iam using solaris 10 SUNW,UltraAX-i2. Iam trying to compile tripwire binaries tw_ASR_1.3.1_SRC. Iam using gcc 3.3.2, later I installed the libiconv package.
    on reading the documentation from sunfreeware i modified the file mkheaders.conf putting the line SHELL=/bin/sh in the directory
    usr/local/lib/gcc-lib/sparc-sun-solaris10/3.3.2/install-tools
    The PATH and LD_LIBRAY_PATH are like this
    # echo $PATH
    /usr/local/bin:/etc:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/ucb:/bin:/sbin/:/usr/sb
    in:/usr/man:/usr/include/
    # echo $LD_LIBRARY_PATH
    /usr/local/lib:/usr/X/lib:/usr/lib:/usr/ucblib:/lib:/usr/ccs/lib:/etc/lib:/usr/d
    t/lib
    Once I changed the configuration changes in the tripwire source. Iam trying to compile make & make install. The output of the make is like this
    # make
    (cd util; make CC=gcc CFLAGS="-O" \
    LDFLAGS="-ldl" CPP="gcc -E" SHELL=/bin/sh all)
    ### Ignore warnings about shift count negative/too large on line 36
    gcc -O -ldl byteorder.c -o byteorder
    byteorder.c: In function `main':
    byteorder.c:36: warning: left shift count >= width of type
    byteorder.c:25: warning: return type of `main' is not `int'
    (./byteorder; cat ./ntohl.h) > ../include/byteorder.h
    gcc -O -ldl types.c -o types
    types.c: In function `main':
    types.c:29: warning: return type of `main' is not `int'
    /bin/sh ./types.sh "gcc -E" > ../include/inode.h
    (cd src; make CC=gcc CFLAGS="-O" LIBS="" \
    LDFLAGS="-ldl" CPP="gcc -E" SHELL=/bin/sh \
    YACC="yacc" LEX="lex" all)
    /bin/sh help.sh help.txt > help.c
    gcc -O -c config.parse.c
    gcc -O -c main.c
    main.c:704:2: warning: no newline at end of file
    gcc -O -c list.c
    gcc -O -c ignorevec.c
    gcc -O -c dbase.build.c
    gcc -O -c utils.c
    gcc -O -c preen.c
    gcc -O -c preen.interp.c
    gcc -O -c preen.report.c
    gcc -O -c nullsig.c
    gcc -O -c config.prim.c
    gcc -O -c dbase.update.c
    lex config.pre.l
    mv lex.yy.c config.lex.c
    yacc config.pre.y
    sed 's/lex\.yy\.c/config.lex.c/' < y.tab.c > config.pre.c
    rm y.tab.c
    gcc -O -c config.pre.c
    gcc -O -c help.c
    (cd ../sigs/md5; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c md5.c
    gcc -O -I. -I.. -c md5wrapper.c
    (cd ../sigs/snefru; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c snefru.c
    (cd ../sigs/crc32; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c crc32.c
    (cd ../sigs/crc; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c crc.c
    (cd ../sigs/md4; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c md4.c
    gcc -O -I. -I.. -c md4wrapper.c
    (cd ../sigs/md2; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c md2wrapper.c
    gcc -O -I. -I.. -c md2.c
    (cd ../sigs/sha; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c sha.c
    gcc -O -I. -I.. -c shawrapper.c
    (cd ../sigs/haval; make CC="gcc" CFLAGS="-O -I. -I..")
    gcc -O -I. -I.. -c haval.c
    gcc -O -I. -I.. -c havalwrapper.c
    gcc -O -ldl -o tripwire config.parse.o main.o list.o ignorevec.o dbase.build.o
    utils.o preen.o preen.interp.o preen.report.o nullsig.o config.prim.o dbase.upd
    ate.o config.pre.o help.o ../sigs/md5/md5wrapper.o ../sigs/md5/md5.o ../sigs/s
    nefru/snefru.o ../sigs/crc32/crc32.o ../sigs/crc/crc.o ../sigs/md4/md4.o ../sigs
    /md4/md4wrapper.o ../sigs/md2/md2.o ../sigs/md2/md2wrapper.o ../sigs/sha/sha.o .
    ./sigs/sha/shawrapper.o ../sigs/haval/haval.o ../sigs/haval/havalwrapper.o
    gcc -O -ldl -o siggen siggen.c ../sigs/md5/md5wrapper.o ../sigs/md5/md5.o ../sig
    s/snefru/snefru.o ../sigs/crc32/crc32.o ../sigs/crc/crc.o ../sigs/md4/md4.o ../s
    igs/md4/md4wrapper.o ../sigs/md2/md2.o ../sigs/md2/md2wrapper.o ../sigs/sha/sha.
    o ../sigs/sha/shawrapper.o ../sigs/haval/haval.o ../sigs/haval/havalwrapper.o
    nullsig.o utils.o
    I think it is not showing any problem. But when I try to make install it is throwing some
    error like this. It was unable to find theinsta;; directory under /usr/local/bin. Manually I created the directory to test, it is throwing an error saying that bad file number.
    Can any one help me what could be the reason for this.
    # make install
    (cd util; make CC=gcc CFLAGS="-O" \
    LDFLAGS="-ldl" CPP="gcc -E" SHELL=/bin/sh all)
    (cd src; make CC=gcc CFLAGS="-O" LIBS="" \
    LDFLAGS="-ldl" CPP="gcc -E" SHELL=/bin/sh \
    YACC="yacc" LEX="lex" all)
    /usr/local/bin/install -d /usr/local/bin
    sh: /usr/local/bin/install: not found
    *** Error code 1
    make: Fatal error: Command failed for target `install'
    Sanjeev

    Unable to Deploy Toplink-EJB to Standalone OC4J (4605867)
    http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/early_access_addendum.htm#dep1

  • How to compile servlet with Edit Plus?

    Hi
    I am writing a Java servlet in EditPlus and am wondering how to include the servlet.jar file so that EditPlus knows where the javax.servlet.*, etc classes are. I suppose this is an EditPlus specific question so sorry about that but I didn't know who else to ask other than EditPlus themselves of course and I think I have tried that once.
    I have read replies on this forum about changing the classpath but I dont think that that is what I need to do here and if it is I dont know what I should be writing as I am not using the jdk.
    If anyone can help me at all I would be very grateful.
    Thanks

    Yes, I have also compiled Java files from EditPlus. Using the facilities for configuring 'User Tools' in EditPlus.
    EditPlus runts programs(javac in the current context) in a separate environment(separate DOS command).
    I just compiled, from EditPlus, some Java file of mine that uses something from the servlet API. It compiled just fine. I did not do any classpath or other setup on classpath lines inside EditPlus. I guess, EditPlus inherits the existing CLASSPATH(all environment settings in fact) setting from your environment and thereafter aslo passes it along to the separate command prompt it opens to run user configured tools to run.

  • How to compiling package with j2sdk

    can I just use one command line to compilng a package under J2SDK?

    I'm sure I'm not really doing you any favours here since wherever you would go otherwise (like a tutorial) would teach you much more than the simple answer to your question but, if you'll promise (no crossed fingers) to go and look at the tutorial mentioned by jesperdj then I'll tell you...
    javac dir1\*.java dir1\dir1a\*.java dir2\*.javai.e. list all the directories you want compiled, with spaces in between.
    Chris.

  • How to use /usr/bin/gcc  with Accelerate?

    Hi,
    After upgrading Mac to OSX10.9, C compiler has been changed to LLVM.
    Using gcc4.9(http://hpc.sourceforge.net), /usr/local/bin/gcc -framework Accelerate xxx.c works well.
    Using /usr/bin/gcc, how to compile it with Accelerate?

    Put the line, #include <Accelerate/Accelerate.h>, in your program,
    cc -framework Accelerate xxx.c

  • Darwin and problem with gcc

    Hi,
    I'm trying to compile c-programs with gcc installed with the xtools from the tiger 1.4.8-cd on my system. For the first step I tried a "Hello World" program.
    When I compile it with 'gcc HelloWorld.cpp' on a linux system I get a a.out, and this is the program, that tells me "Hello World!".
    When I try
    "me$ gcc HelloWorld.cpp"
    on my MacBook, then I get the error message
    "/usr/bin/ld: Undefined symbols:
    __gxx_personalityv0
    collect2: ld returned 1 exit status"
    What is wrong on my system?
    Can anyone please help me to solve this problem?
    Best regards,
    Boltzmann
    The source code is ;-):
    #include<stdio.h>
    int main()
    printf("Hello World!");
    return 0;
    MacBook 13"   Mac OS X (10.4.8)   1gb ram; 1.83Mhz; 60gb disk space

    Name the file HelloWorld.c; .cpp is for C++. If you want to compile C++, use g++, which links to the proper libraries for C++.

  • Compile mplayer with gcc4 or higher

    Does anyone know how to compile mplayer with gcc4 ?
    I located this:
    http://www.rocklinux.net/packages/mplayer.html
    Although theres no quick and easy wiki on it like alsa / xorg / nvidia etc...

    There are gcc4 patches out. Here is one url:
    http://arch64.org/svn/*checkout*/trunk/ … gcc4.patch

  • OpenMP with gcc over network?

    Does anyone know how to run OpenMP with gcc on two, three or more computers (identical computers with identical settings) that are connected together by router?
    At the moment I have ssh connection between each node (with each node having keygen ID of all others).... so no password is needed for any ssh connection request.
    Last edited by kdar (2013-03-20 17:31:55)

    It is important to remember that OpenMP uses shared memory as a means of communication between multiple threads. Generally speaking, OpenMP cannot be used to parallelize an application over multiple machines (because they do not share the same memory address space). I seem to recall reading about some research going into virtual shared memory systems for clusters, which would allow an threaded application to be run as if it was on a single machine. Unfortunately, I can't seem to find the article at the moment.
    Anyway, for distributed memory systems (e.g. clusters), the Message Passing Interface (MPI) is the de-facto standard. There are a number of different MPI implementations, with Open MPI and MPICH being popular choices. The main advantage of MPI is that it defines a portable standard for developing parallel applications. In theory, an MPI based parallel application will run on anything from a single multi-core desktop PC, to a Beowulf UNIX/Linux cluster, to a top500 supercomputer. Some of the better MPI implementations will even optimize the communication based on the particular environment you are running in. The main disadvantage of MPI is that it generally requires one to use Domain Decomposition Methods (DDM) to efficiently parallelize their application. While DDM is very powerful, it does carry some important trade-offs: (1) it cannot be easily retrofitted to existing serial applications, and (2) it can impact the numerical stability and accuracy of your simulation. This is why there has been a fair amount of research going into hybrid MPI/OpenMP applications; where MPI is used for coarse grained parallelizm, and OpenMP for the fine grained parallelizm.
    In your case, it sounds like you're trying to run a computation on commodity PC's over a home/office LAN? In this case, you should look into the possibility of configuring these machines to function as a small Beowulf cluster. Then running MPI and MPI/OpenMP applications will be very straightforward. Of course, before you invest in doing this, you'll want to estimate the parallel efficiency you would get with this configuration. Unless you're using high speed networking equipment, it may turn out that your application doesn't run significantly faster on two machines than one. For sure, it won't be twice as fast. (I'm assuming that the motivation for doing this is to make your application run faster; i.e. you're not memory bound.)
    I hope this helps.
    EDIT: I also seem to recall reading about tools for Grid Computing. The main idea behind Grid Computing is being able to create ad-hoc clusters out of an arbitrary collection of networked computers (either via the Internet or LAN). So, perhaps do some Googling with "grid computing", and see if that turns up anything that helps.
    Last edited by bsilbaugh (2013-03-23 00:24:32)

  • How to compile DNG SDK with GCC?

    I tried to compile DNG SDK with GCC, but I got stuck to the following error message:
    ... dng_flags.h:33:28: error: RawEnvironment.h: No such file or directory ...
    In other words, it seems that file 'RawEnvironment.h' is missing. I cannot find this file from DNG SDK or XMP SDK. Do you know where I could find this file or do you know how to compile DNG SDK with GCC?
    Regards Sami

    Please define either qMacOS or qWinOS (i.e., in your list of preprocessor defines). As you can see in line 32 of dng_flags.h this is required.

Maybe you are looking for

  • Motion 4 - Canvas not properly displaying media

    I have a new mac pro tower and have recently installed FCP 3. Everything has been working fine until I started with Motion. It seems that no matter what type of media I import into Motion, the canvas displays a mostly black image with some sparse col

  • Not able to open ppt files

    I'm experiencing problems opening some .ppt files. When I try to open that files a window pop-up. The header of the window is: "oracle hyperion smart view for office, fusion edition". In the window is written: "Presentation.SlideShowWindow : Invalid

  • Compare iDive vs FootTrack Movie Clip Organization programs

    Does anyone have experience with iDive and/or FootTrack for organizing movie clips? I am trying to get a comparison of the two software products.

  • HT1695 what does hsdpa indicates on the status bar on my IPhone 4s?

    what does hsdpa indicates on the status bar on my IPhone 4s?

  • One Key to Rule them all - gpg

    Hi, Right now i have multiple gpg keys, one for each identity i assume. Its kinda annoying having to manage them all, but at least i have some control of what i share with other. Anyways, i just thought of an alternative, Is it possible to have one k