I have been using gcc to compile C programs. I want to know what exactly is the meaning of Compiling a C program. I checked cc -S prog.c will give an .S file and if you analyze the hexdump I saw some assembly instructions. So what does the compiler do which is not required in case of interpreted languages?
How can I compile a C++ application using g++ with x86 platform settings on a x86_64 machine ? What are the possible negative side-effects of compiling a C++ application with x86 settings on a x86_64 platform ?
I had developed a C program on linux (x86). Now I need to port it to HP-UX OS on IA/PA 64 bit arch. What are the options to be used with cc compiler, on linux (x86), so that this could be done, if at all.
I am trying to compile systemc. Configuration is done OK and Makefiles are created. As soon as the "make" command i issue, recursively reaches the "utils" directory, errors are produced -declaration and include errors.
The files referenced by the errors DO exist and i hava managed to give g++ "-I ${LD_INCLUDE_PATH}, ie the variable, where all header dirs are listed. Libraries and compilers for gcc3.3 and g++3.3, i believe, are installed OK. code...
Compiling a C++ program including libpq-fe.h by the command Code: g++ -I/usr/include -L/lib -lpq my_program.cpp for access to a PostgreSQL database results in the error Code: undefined reference to '_PQconnectdb'
I've got an error with compiling a program: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/python2.5/config/libpython2.5.a: could not read symbols: Bad value collect2: ld a retourn 1 code dtat d'excution make[2]: *** [bindings/_yafqt.so] Erreur 1.
I have 3 c++ files, classdef.h (header file with class definition), methods.cpp (class methods) and program.cpp - the program itself. Both .cpp files have
Code:
#include "classdef.h"
in files. How I can link the files together and compile them in one executable program? I am using Geany IDE for coding.
I'm trying to learn how to use USB from c code. Rather trying kernel stuff I thought I'd (after some searching ) use libusb. So I searched for documentation, unfortunately I came across two sets of documents each with it's own API? [URL] and [URL] For example one inits with libusb_init (libusb_context **context) the other uses void usb_init(void); I'm using libusb rather than kernel programming as I'd like to compile the code for windows as well as linux.
I'm a newbie when it comes to embedded linux / cross compiling. Never had to have anything to do with it b4 I bought my NAS. The Nas only has a 500MHZ ARM9 so compiling anything is painfully slow. Also only has 128MB ram. I managed to cross compile the kernel but am not sure how would you cross compile something like HPLIP for example.
Gnome-sharp is a dependency of Tomboy. It has many dependencies itself, but all are satify-able from SBO. So I installed them all (yes including mono!) from SBO, then tried to install gnome-sharp. Problem is when running the slackbuild I get this error -
So i made this application using QtCreator and when I run it on another computer it saysQuote:libQtGui.so.4 -- cannot be found...ok so i installed libqt4-core and libqt-gui but now it says..
I'm using slackware 13.37 and I must say that I really like this distro and the biggest problem is the lack of dependency handling. This is something that bites you right away because you have this nice clean simple operating system but unless you really know what's dependent on what you have to install piles of stuff with lots of programs with duplicate functions. A minimal install option would be nice and I can see from some of the threads that even those with a good deal of experience have had a hard time doing a minimal install. I tried about ten times using different guides but I always ended up with something broken so now I have the full install running fine but with tons of stuff that I don't want or need including most of kde. Anyway, I don't think that the slackware people are going to change their minds about dependency handling anytime this century.
Although for those who have said that it's a FEATURE, I'd point out that all distros have this feature, JUST DON'T USE THEIR PACKAGE MANAGER! So with all that said, I think it's a shame about the lack of dependency handling but I still like slackware well enough to use it even though I find the dependency thing quite annoying. I know that there are people here that have a lot more experience than I do and maybe there are some tools that could make this business easier. So how do you go about removing programs? Debian has deborphan and Arch has pacman -Rd. When you remove a program in slackware, how do you then get rid of all the unneeded dependencies?
I was reading the following forum guide:openSUSE software installation hints So I decide to install from the souce code the following webcam application:
GTK+ UVC Viewer In order to avoid problems ( it is my first installation from souce code) I downloaded and unpacked everything in an USB key and I worked from, as the guide said, from the Linux terminal. Once I was in the right directory and I compute the command:
I am trying to compile a simple remote procedure call program. I am getting an error: /tmp/ccy0M5rT.o: In function 'main': rpchighlayer.c.text+0x5c): undefined reference to 'rnusers' collect2: ld returned 1 exit status
I wrote a program in c++ on fedora 11. When i compiled it using g++. it displays the following error:
g++ fibnocci.cpp fibnocci.cpp:2:22: error: iostream.h: No such file or directory fibnocci.cpp: In function int main(): fibnocci.cpp:8: error: cout was not declared in this scope fibnocci.cpp:8: error: endl was not declared in this scope
I'm sometimes compiling a piece of software on my Fedora 13 machine and then transferring it to an Ubuntu box. Recently I noticed this would yield issues with Fedora's .so files:
Given I had a program's binary and an .so file the program would attempt to load, both compiled on Fedora, the program would run fine on Ubuntu 8.04 LTS but would be unable to load to open the Fedora .so with an "ELF file OS ABI invalid" error.
Now any program I natively compile on Ubuntu which I run on Fedora instead, will throw the *same* error with Fedora .so's - so basically neither a Fedora bin on Ubuntu, nor an Ubuntu bin on Fedora can load the Fedora .so files, only a Fedora bin natively on Fedora can.
That means Fedora .so files are always a problem on Ubuntu, and Ubuntu bins are always a problem on Fedora (unable to load system libs there).
This is a bit odd for e.g. binary redistributions of programs (which are rare I know) and I also found out that e.g. Tibia's linux client suffers from this issue (throws "ELF file OS ABI invalid" on my Fedora 13 when attempting to load my system's libGl).
And I started to wonder whether the only way to work-around to get something that works on all platforms is a Fedora binary shipped with .so files compiled on Ubuntu - which seems a bit stupid and ridiculously complicated just to get something that works flawlessly everywhere. Isn't there e.g. a gcc switch that will allow me to compile the .so files on Fedora in such a way that they can also be used on an Ubuntu system so just compiling everything on Fedora, yet getting it to work on Ubuntu aswell would be possible?
I decided I was going to compile XChat from source today for "fun." What I ended up doing was spending a few hours getting it to compile, then find out everything didn't work the way I thought it did. I was under the impression that after I ran "sudo make install" I was "upgrading", when in reality I'm just installing a seperate version alongside the old one. Apparently I have to keep the old version so every program that was compiled with it will continue to work, so how do I:
1) Force a program to use a specific version of GTK when compiling. 2) Find where my version of GTK installed to.
I've asked some people and I've just been told to "learn LD_PRELOAD". I've googled and can't figure how I could even apply that to my current problem