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


ADVERTISEMENT

Ubuntu :: Type "helloWorld" Or "sudo HelloWorld" It Does Not Run?

Jan 18, 2011

I coded a simple hello world program to see if I can get something to work on my own in Linux. I used the command "sudo g++ hello.cpp -o helloWorld" to build the executable. However when I am in the terminal (in the right path) and I type "helloWorld" or "sudo helloWorld" it does not run. I look over at google and it told me that I could be in the wrong directory (path) what I am not, or the file permissions could be set wrong. However I looked it up on google as well and I can't see nothing wrong with the file permissions. Hoping someone could lend a helping hand. These are the file permissions as received from "ls -l".

Quote:

drwxr-xr-x 3 root root 4096 2011-01-18 19:38 bin
-rw-r--r-- 1 root root 1050 2011-01-18 19:37 hello.cbp
-rwxr-xr-x 1 root root 7734 2011-01-18 19:41 helloWorld
-rw-r--r-- 1 root root 117 2011-01-18 19:37 main.cpp
drwxr-xr-x 3 root root 4096 2011-01-18 19:38 obj

View 7 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

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 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 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

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

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

General :: View CD Shortcut Link / List Link Name By Using Any Command?

Jun 8, 2010

Whenever we insert CD,it creates a shortcut link in desktop.Can we list this link name by using any command? I am using Oracle Enterprise Linux 5.0.

View 10 Replies View Related

General :: Difference Between A Hard Link And Symbolic Link?

Jun 20, 2011

I have searched around and am trying to understand the difference between a hard link and symbolic link (soft link). I found this link is quite useful. But I am still not very clear. I understand soft link is not a copy of original file, but is a hard link a copy or not?

View 4 Replies View Related

Red Hat :: Error - Make: *** [HelloWorld.o] Error 127 For Eclipse C++ ?

Jun 3, 2010

I have installed a copy Fedora core 10 with the Eclipse C++ CDT feature. I am getting the following error when I do a project build for the "HelloWorld.cpp" Eclipse sample program: make: *** [HelloWorld.o] error 127

I am somewhat certain it is caused by an improper or incomplete configuration of Eclipse C++ CDT. Can anyone provide detailed instructions for configuring the Eclipse C++ CDT?

View 4 Replies View Related

Ubuntu :: Send A Link For Download And A Link With The Installation Instructions?

Aug 16, 2011

I was looking for live link to download ubuntu mobile but unfortunately I don't find anything... Can someone send me a link for download and a link with the installation instructions ?? All the links that I found are dead.

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

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

Programming :: Link Directories - Symlink Not Updated / Hard Link Not Supported?

Sep 6, 2010

In the ordering of files I keep I need links to directories. Sometimes I even need to move directories to new locations. I have tried using symlinks, but they become dead when I move the directory they point to. I have tried hard links, but I haven't found any Linux file system that would support hard linked directories. How can I achieve that a complex structure of directories (currently with symlinks for directories and hard links for files) keep symlinks live when directories are moved?

- is there any utility that updates symlinks when a directory is moved?

- is there any Linux filesystem that supports hard linked directories?

- is there any good Linux interface to the new NTFS (the only file system I know to support automatically updating directory links, called directory junctions)?

View 9 Replies View Related

Server :: Create Soft Link And Hard Link In RHEL5?

Sep 8, 2010

how can we create soft link and hard link in RHEL5 when am using in command it is giving format error

View 6 Replies View Related

General :: Ubuntu 10.04 - Linking To Lua Libraries With Codeblocks

Jun 18, 2010

After I downloaded the source for lua, I followed the install instructions, doing...

make linux install
make generic install

I've also done the make test and it passes, printing out Hello World, from Lua 5.1. However, I can't link to the lua libraries in CodeBlocks. I know where lualib.a is (usr/local/lib) which I set in my Search Directories for the linker. I still get error messages like...

undefined reference to lua_isstring

P.S. I had this running on Windows via Visual Studio.

View 1 Replies View Related

General :: If The Libraries Are GPL Or LPGL

Jan 12, 2010

I am working on a user space application that I would like to release under the LPGL. I am linking against libraries that I'm not sure if they are GPL or LGPL. Can someone help me determine if the libraries are GPL or LPGL.

For reference I have included a snippet of my gcc command:

View 4 Replies View Related

General :: Add New Libraries To SuSe?

Apr 30, 2011

How do I add new libraries to SuSe Linux?

View 1 Replies View Related

General :: Install X11 Libraries On Red- Hat?

Nov 12, 2010

I am new to linux environment. I need to install libxt-dev ; libx11-dev ; and xorg-dev (xserver-xorg-dev)

My Red Hat Linux Enterprise version is : Linux 2.6.9-5.EL # I think the redhat is enterprise edition 3

View 6 Replies View Related

General :: Dealing With Locations Of Libraries

Mar 7, 2010

What can you do when your linux system "can't find" dynamically linked libraries that are indeed installed in their correct locations? Case in point, I'm trying to run a program called 'ucanvcam':

oliver@human ~/installed/ucanvcam-0.1.6/bin $ ./ucanvcam
./ucanvcam: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
oliver@human ~/installed/ucanvcam-0.1.6/bin $ locate libgd.so.2
/usr/lib64/libgd.so.2.0.0
/usr/lib64/libgd.so.2

oliver@human ~/installed/ucanvcam-0.1.6/bin $ ldd ./ucanvcam
linux-gate.so.1 => (0xf7706000)
[...]
libgd.so.2 => not found
[...]
librt.so.1 => /lib32/librt.so.1 (0xf6b1e000)

How can I tell it to look for libgd.so.2 in /usr/lib64? And more importantly, why isn't it looking there, and where is it looking?

View 1 Replies View Related

General :: Installing Libraries For Cygwin?

Mar 19, 2010

I want to install these libraries in cygwin, how do I do it? are all of them available on cygwin environment or only on linux?

g++ - the version 4.4
graphviz
gnuplot
plotdrop

[Code].....

View 1 Replies View Related

General :: Specify The Location Of Libraries To A Binary?

Sep 25, 2010

I'll be using a specific example, but really this generalizes to pretty much any binary on linux that can't seem to find its' dependent libraries. So, I have a program that won't run because of missing libraries:

./cart5: error while loading shared libraries: libcorona-1.0.2.so: cannot open shared object file: No such file or directory

ldd sheds some light on the issue:
linux-vdso.so.1 => (0x00007fff18b01000)
libcorona-1.0.2.so => not found
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6

[Code]....

View 2 Replies View Related

General :: Linking GPL Apps To Non-GPL Libraries

Jan 20, 2010

I have a library that I have ported from Windows, and is not a derivative work of Linux. The library is subject to copyright law, and I can't disclose the source. I would like to link a GPL application to this library, and want to know if the linking would cause the library to be GPL. If the library becomes GPL, is there some other way (kernel loadable module?) that I can keep my library from becoming a work of GPL?

View 2 Replies View Related

General :: How To Install And Interrogate Libraries

Mar 25, 2011

im currently working on openbts,how can i get into the configuration file..its simply written that the config file is found in ./apps directorypenbts.config.but i have an error'No such file or directory'

View 1 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 :: Link To File On The Host System - Error "Invalid Cross-device Link"

Oct 25, 2010

I installed 10.10 using wubi (Host system is Win XP). I want to create a symbolic link of a file on the host system (Windows c:abc.doc file) in my Ubuntu home ~/ directory.
When I type command ln /host/abc.doc abc.doc It gives me following error ln: creating hard link `abc.doc' => `/host/abc.doc': Invalid cross-device link

View 1 Replies View Related







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