Software :: Link Custom Libraries To Target Executables Using In G++ Linker

Jun 29, 2010

I am having some trouble when I try to link my custom libraries to target executables. There are two libraries

liba
libb

and an executable exec based on main.o The library libb has some reference to liba. Now if I put the libraries in same directories, I can compile the code as g++ -o exec main.o liba.a libb.a But, if I put the libraries in different directories, say d1 and d2, and use the command as g++ -o exec main.o d1/liba.a d2/libb.a I get an error as undefined reference to some function in liba. I am not sure if I am missing some thing in linking process. Also, if libb doesnot refer any functions in liba, there is no error in either of the case.

View 1 Replies


ADVERTISEMENT

Debian :: Edit Link Target / Edit The Link Target To Force Ip String At End?

Jun 16, 2011

What I am trying to do is edit the link target to force ip=xxxx.xxx.xxx string at end. I have a software program which access 4 different servers running the software but with different configs. In xp I can copy links and modify as above to correctly force the program to the various servers.

I have read the various how tos on hard vs sym links which I get. Playing around with hardlinks and sysmlinks (the examples I find) does not seem to be what I need. Feel like this is pretty basic stuff but I am a bit stumped.

View 1 Replies View Related

OpenSUSE :: Symbolic Link Not Allowed Or Link Target Not Accessible: /srv/www/htdocs?

Apr 28, 2010

i only need localhost for testing some phpnow i get[Wed Apr 28 18:44:57 2010] [error] [client ::1] Symbolic link not allowed or link target not accessible: /srv/www/htdocs

View 9 Replies View Related

Ubuntu Networking :: Mount To Vista Needed For Apache - Symbolic Link Not Allowed Or Link Target Not Accessible

Apr 26, 2010

I have a problem where I'm using Ubuntu linux to mount a Windows Vista machine's USB drive and access it on the web using Apache. I did have the USB drive plugged into the Linux machine directly and that was working via the web. FollowSymLinks is on in httpd.conf

[Code]....

The mount works and I can see the files (see above) from my regular linux user account. If I make a test file in /mnt and soft link to that, I can see it on the web. So it's just the mount to the vista machine that seems to be a problem. It's supposed to be a simple read-only mount and the apache login should (I think) be able to see the same generic root access permissions.

log from apache: [Mon Apr 26 20:39:42 2010] [error] [client 99.99.99.99] Symbolic link not allowed or link target not accessible: /home/user1/pub_html/Music, referer: https://xx.xx.xx/~user1/music.html

The credentials have a login and password that matches a special read-only account on Vista. I can see the files on the system from Linux, but not via the web. As mentioned above, a different link to the same /mnt area works fine via the web. I've tried several different mount options with no success.

View 3 Replies View Related

Programming :: GCC Linker Failed To Link ?

Apr 7, 2011

In linking a library in using GCC.

I am compiling Pro*C code.

When the maKe file start compiling if prints following :

Code:

I tried different options but unable to find the reason why it is not linking the libraries correctly.

View 3 Replies View Related

Programming :: Linker Error - Couldn't Get The Program To Link

Jul 9, 2010

I have a simple C program which uses ncurses library and I am having linker issues and couldn't get the program to link.

[Code]...

So I think the ncurses libraries are in place but gcc still couldn't link. I am totally stumped.

View 3 Replies View Related

Programming :: C++ Link Error - File Format Not Recognized - Treating As Linker

Apr 22, 2010

I am trying to compile a software using a provided sdk. I suspect that the sdk has some mismatch of the platform library, but I am not sure.

The error I got is

Code:

The libidata.so.42 is there in that folder. I guess the file might be in a big endian. Is there a way to check if the libidata.so.42 i have might be a big endian format, rather than little endian?

If my guess is incorrect, This is a c++ code on fedora x86 machine.

View 4 Replies View Related

Ubuntu :: Lucid Apache2 Directory Symlink Error "Symbolic Link Not Allowed Or Link Target Not Accessible"

Jun 2, 2010

There is a symlink from /var/www to a personal directory. FollowSymlink and chmod 755 are all set. It works perfectly until each morning I will get a "Symbolic link not allowed or link target not accessible" error. When I do a "sudo service apache2 restart", the problem will go away.

View 1 Replies View Related

Ubuntu :: Hard Links In Tar.gz When Both Link And Target Are In The Archive?

Jun 28, 2010

I am copying my home folder from my old computer (Ubuntu 9.10) to my new one (Ubuntu 10.04)

I thought that I would make a tar archive of my home directory (~60GB), then copy it across the network and untar it in my new home folder.

The problem is that I have several hard links (30 at most). When I try and untar the tar in my new computer it runs into errors with the hard links.

I think the problem is that it has unzipped the hard link before it's target and detected an error.

One solution is to add --hard-dereference to the tar command , this will create a separate copy of each hard link. but I would really like an exact copy of my home folder on my new computer.

Does anyone have any ideas? Either copying my home directory, or how to make tar handle hard links sensibly?

View 2 Replies View Related

Ubuntu :: Cannot Link Libraries To G++

May 18, 2011

I've been trying to use the library boost/thread.hpp but I cant get it to link. Every time I try it looks like this:
Code:
tyler@TjLaptop01:~/Desktop$ g++ thing.CPP -o Desktop -lboost_thread
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status

View 2 Replies View Related

Programming :: Link Static Libraries With Gcc

Oct 15, 2010

I am stuck with a problem to link static libraries with gcc. There is no problem with source files since I am able to compile in a machine where the static library is installed. I am compiling with the following: Code: :~/Emotion/pjproject-1.0.3/third_party 157% gcc -Wall -I/portaudio/include -o rec patest_record.c -L./lib -lportaudio-x86_64-unknown-linux-gnu

[Code]....

View 5 Replies View Related

General :: Ubuntu GCC Helloworld.c - Link And Set Environment For Libraries?

Sep 4, 2010

i have a helloworld.c program that I want to compile and link. i managed to compile it and link it but when i run it using:

Hello

at commant prompt it returns with error about package having a Hello and Hello_Debhelper and I use sudo.....?

View 5 Replies View Related

Software :: Unable To Link Shared Libraries While Doing Rpm Upgrade?

Mar 25, 2011

When performing rpm -Uvh, my rpm is not able to link the shared library. My rpm use shared libraries which are created by my software. when i do rpm -ivh everything is working fine My rpm creates the softlinks to the shared libraries. Now when i install the rpm using -Uvh switch which upgrade..the shared libraries are not loading.

View 1 Replies View Related

CentOS 5 :: Libetpan Won't Link Against 64 Bit System Libraries / Sort It?

Feb 16, 2009

I'm trying to compile libetpan-0.57 on RedHat Enterprise Linux 5.2 64-bit and it is refusing to link against the 64 bit system libraries. I've tried everything I can think of. I've tried to hack libtool, run the command make was trying to run manually and changing the library search paths but nothing works. When I run the command make tried to run manually and change -L/usr/lib to -L/usr/lib64 most of the "skipping incompatible" library messages disappear except for "/usr/lib/libexpat.so: could not read symbols: File in wrong format." Below is the output when I run make code...

View 4 Replies View Related

Software :: Link Gfortran Compiled Code With Lapack And Arpack Libraries?

Jun 27, 2009

In mandriva 2008 platform I have installed gcc-g77, liblapack, liblapack-devel, libblas, libblas-devel, arpack, arpack-devel and arpack-static packages. When I link *.f code and these libraries, using g77 compiler with -llapack -lblas -larpack options, everything work. Then when I replaced g77 by gfortran compiler, to be able to work with double precision complex arithmetic, I have got a number of undefined references errors:

[code].....

It looks as if I need to install f95 lapack and arpack libraries. Does anybody know if such rpm packages exist? I cannot find them in the net. If they exist, where is it possible to download them?

View 1 Replies View Related

Ubuntu :: Custom Live CD - Run Without Changing System Link

Jul 30, 2009

I am new to linux, but need to do the following:
1.) Use a basic ubuntu 9.04 distro
2.) On boot run an existing .sh script

I would like to make a thumbdrive with a live cd version that will auto run to desktop and execute the .sh script. I am looking for pointers on accomplishing this. I have found ways to get the live cd to run on USB, but it still involves clicking the "run without changing your system link" and I cannot figure out how to run the script on start up.

View 3 Replies View Related

Software :: Editing SARG To Link It To Custom Location?

Jan 12, 2011

I am using SARG for squid report analysis. And it is working fine. But I want to know if there is some custom configuration possible to link the SARG image at the top of the page to my custom location instead of its default homepage on sourceforge? For the ease of understanding, I am attaching the page screenshot here. The SARG image I am talking about is the one on the top in blue colour. It is linked to [URL] and I want it to link it to my sarg homepage.

View 2 Replies View Related

Programming :: Link The MySQL Libraries To Some C Code - /home/zgp/gammasqla/list.c:1883: Undefined Reference To `db_do_query'

Sep 6, 2010

I'm trying to link the MySQL libraries to some C code, the LambdaMOO server to be exact. I'm getting the following error:

gcc -g -O -L/usr/lib/mysql -lmysqld -I/usr/include/mysql ast.o code_gen.o db_lo
ad.o db_flush.o db_objects.o db_properties.o db_verbs.o decompile.o disassemble.
o eval_env.o eval_vm.o exceptions.o execute.o extensions.o functions.o keywords.

[code].....

You can see the link commands I'm using, and the lib and include path are both valid. I tried replacing -lmysqld with -lmysqlclient but this did not help. I'm using Debian and MySQL, libmysqld-dev and libmysqlclient-dev are all installed.

View 1 Replies View Related

CentOS 5 :: Differences Between Scsi-target-utils & Iscsi-target

May 8, 2009

I want to run ISCSI target on CentOS. Both "scsi-target-utils" and "iscsi-target" can be used.

They seem to have the same function.

Is there any significant difference between them, on performance or stability?

View 4 Replies View Related

General :: Use Always The Latest Versions Of The Libraries And Don't Save The Old Libraries For Compatibility?

May 11, 2011

Why many Linux distros are trying to use always the latest versions of the libraries and don't save the old libraries for compatibility? I mean, I can see libtiff for example, i can found a libtiff.so.5 on my /usr/lib, but doesn't store a libtiff.so.4 or 3 just for binary applications or games. For this example, I need libtiff.so.4 for uplink.

That should happen too on the old version of sims for linux, some ID games or others.What's wrong with storing old libraries? PD: Yay, my first post on 3 years!

View 6 Replies View Related

General :: Using Dynamic Libraries As Static Libraries?

May 6, 2010

Is there any way to use a dynamic libraries as a static libraries instead when compiling, so that my resulting executable won't have them as dependencies?

View 3 Replies View Related

Programming :: Linker Error Using Cross Compiler

Aug 11, 2010

I am using a arm compiler to build my program but getting following compiler error at the end -
init.c.text+0x2c): undefined reference to '__libc_csu_fini'
init.c.text+0x34): undefined reference to '__libc_csu_init'

View 1 Replies View Related

General :: Use A Newly Compiled Dynamic Linker?

Feb 16, 2011

install a newly compiled linker as the default linker on my VM running Ubuntu. I compiled and installed a new custom kernel on my VM (linux-2.6.36) and also compiled (not install) a custom gnu c library (glibc-2.11.2) on the newly installed custom kernel. I am able to run a simple helloworld.c program to verify that my program worked successfully using the newly build dynamic linker in the /elf directory.

I want to replace the real linker inside /lib with the new linker that I compiled. I tried to make the soft link named ld-linux-x86-64.so.2 that originally points to the real linker file ld-2.11.1.so, point to my newly compiled linker, but my VM crashed. I also tried moving the compiled linker and wrote it over the original linker, and the VM crashed. None of the commands worked after that as they could not access any of the shared libraries and I received this error '/bin/bash: No such file or directory'. I also tried to change the LD_LIBRARY_PATH to point to my linker and did not have any luck there either.

View 2 Replies View Related

Programming :: How To Write A Lds - Linker Script - File?

Oct 13, 2010

I first found something called lds(linker script) file.

And now I am willing to do a test with __attribute__((section)) to make a function stay in a private section. Sounds fun to me.

Part of my source code looks like this

By objdump, I didn't find a section called "my_own".

View 2 Replies View Related

Programming :: Static Linker With Make Configure

Oct 2, 2010

I need to compile a program and make it portable to other computers, but it needs some external libraries and I don't want them to be linked dynamically, I would like to compile them as one single executable or at least compile them in the same directory as the main output files. The program is sphinx>, it has its own configure and make scripts. I know I can run g++ with the -static flag, but I don't know how to do this with make or configure. This is the ./configure --help output

[Code]....

View 1 Replies View Related

Programming :: Undefined Reference To 'pthread_create' From Linker?

Jul 6, 2010

I am having trouble linking the pthread library.I have -lpthread -lm as options for the GNU GCC compiler.

Build Log
Compiling: main.c
Compiling: matrix.c

[code]...

View 2 Replies View Related

Fedora Installation :: Erratic Install Results W/initrd - Custom Spins With Custom Drivers - Modules?

Dec 28, 2009

Just spent three whole days barking up the wrong tree, solving Fedora 11 and Fedora 12 boot failures because the correct hypothesis was illogical: installation did not update/modify the initrd.

The first couple of times I installed Fedora 11 on the HighPoint Technologies RocketRaid 2640x4, the installation inserted my "custom" driver module (rr26xx) into the initrd, permanently, so that the system booted off the controller card for which the custom driver was inserted. (I yelled about this success in this thread: [url]

My most recent installs of BOTH F11 and F12 on the RocketRaid failed to properly set up the boot. It turns out that the "rr2640" module I "slipstreamed" into the installation process was *NOT* permanently added to the initrd by anaconda. (F12 gave me "no root device found boot has failed, sleeping forever", on boot; F11 hung also, without such error, I presume, during the init script execution). Because of limited resources and time, I only know for sure the module was missing from the F11 initrd, and am ASSUMING the same was the case with F12.

The only difference between the successful installs and the ones with failed boot is that the successful installs were made on a single-drive (JBOD) mode on the controller; whereas, the failed ones were placed on RAID 5. But, AFAIK, the created logical device for the card is "/dev/sda", in both cases, and the kernel can not distinguish between the two cases (or can it?). Thus, the inconsistency cost me a lot of time, and is still inexplicable to me.

Question: What is the best way to deal with custom drivers, today? There are custom spins, and many tools, like isomaster. Stupid question: Is there a way to modify the initrd inside an installer ISO -- be it for CD/DVD/USBboot drive -- beefing the init RAM disk with whatever modules you'd like, for the boot process (using, say, isomaster)?

And what makes anaconda understand that a module must be added to the initrd ? How can one force anaconda to do so?

How does moving to dracut as the initrd tool affect any/all of the above?

View 1 Replies View Related

General :: Run 64-bit Executables On A 32-bit?

Feb 22, 2010

run 64-bit executables on a 32-bit?If yes, how?

OS: 32-bit Red Hat Enterprise Linux Client release 5.4 (Tikanga)

View 3 Replies View Related

Ubuntu :: Linker Error: Cannot Find LXmu (whereas It's Installed)

Feb 16, 2011

I'm trying to compile a file with the following line :

Code: gcc lesson2.c -o lesson2 -I /usr/X11R6/include/ -L /usr/lib/ -L/usr/X11R6/lib/ -L /usr/X11R6/lib64/ -lglut -lGL -lGLU -lX11 -lXmu -lm But i got the error : /usr/bin/ld: cannot find -lXmu

I'm using this to compile a simple OpenGL file, and if I remove lxmu (and lxi, wiche gives me the same error), it got the all clear, but when I tun my program, I got an "Segmentation fault" error (I think because of the missing librairies)... When I did a locate libXmu :

[Code]...

View 2 Replies View Related

Software :: Make - Building Project With Different Linker And Compiler?

Jun 7, 2011

I am trying to recompile a large open source project with the Nvidia Cuda Compiler: 'nvcc' [URL].. nvcc supports all the compile flags that gcc does but not all of the linking options. This shouldn't be a problem however as nvcc generates object files that are compatible with gcc and I should hence be able to compile with nvcc and then link with gcc (linking against the CUDA library).

To compile with nvcc I use:
./configure CC=nvcc

Which successfully creates make files that se nvcc to compile. But the Configuration script does not seem to honor LD=gcc in the same way, ie: ./configure CC=nvcc LD=gcc still tries to link everything with nvcc which promptly fails because nvcc does not support the option '-soname' without which the project will not link correctly. What am I doing wrong? How can tell the config script to link with gcc?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved