Programming :: Error Compiling C++ Program Using C Library
May 8, 2010
I've created 3 files: swap.h and swap.c then make static library from it
Code:
Then I write 2 program to test this library: test_swap.c and test_swap.cpp
I compile
Code:
What's wrong with this in C++? And how can I make a library that can work both for any C and C++ program?
Here the source code
Code:
Code:
Code:
View 2 Replies
ADVERTISEMENT
Oct 14, 2010
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.
View 1 Replies
View Related
Nov 28, 2010
I'm trying to learn how to cross-compile libraries (static and shared) and executables for the Blackfin + uClinux environment.At this point, I can successfully compile a stand-alone "Hello, world" but fail when trying to add a (static) library to the mix.Here's the source code I wrote:
Code:
#========== bar.h
void mytestfunc(void);
#========== bar.c
#include <stdio.h>
[code]...
Googling for this returns talks about "name mangling", but I don't know if this is what it is, and how to change the source/command to solve it.
View 1 Replies
View Related
Jul 29, 2011
I am trying to use the QT4 frontend of poppler library in my application so I need to compile the library.In its main directory ./configure can be run but I got
Code:
checking which font configuration to use... fontconfig
checking for FONTCONFIG... no
configure: error: Package requirements (fontconfig >= 2.0.0) were not met:
No package 'fontconfig' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FONTCONFIG_CFLAGS
and FONTCONFIG_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.
I have fontconfig installed (ubuntu):
2.8.0-2.1ubuntu3 (fontconfig)
However I have no idea where those flags are and what to set them to.
View 11 Replies
View Related
Jun 27, 2010
I've started programming in c recently . following are the details about scene:
* vim is editor and program is compiled in gcc whenever a program involving math function appears it gives error i.though math.h is included in header file compiler complains about it it gives error of unrecognized function that math function like sqrt, etc question is how to connect math.h to a program.
View 14 Replies
View Related
Aug 17, 2010
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?
View 13 Replies
View Related
Mar 10, 2010
it possible to access main program function from dynamicallyinked library in c language?For example:main.c:
Code:
#include<stdio.h>
void func()
[code]...
View 2 Replies
View Related
Apr 28, 2010
I'd like to get path of one library to link it dynamically in my program. Probobly the best way would be to add macro to my configure.ac file.
View 2 Replies
View Related
Aug 19, 2010
Is there any equivalent of WaitFOrMultipleObjects on Linux?
I was finding a cross Platform library that allow you to run another program from your C++ application. I found POCO but it does not support functionality like WaitFOrMultipleObjects for both (linux and windows). I tried boost Process but its not official till now.
View 1 Replies
View Related
Mar 22, 2010
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
Code:
#include <stdio.h>
#include<stdlib.h>
main(argc, argv)
int argc;
char **argv; {
int num;if (argc != 2) {
fprintf(stderr, "usage: rnusers hostname ");
exit(1);
} if ((num = rnusers(argv[1])) < 0)
{fprintf(stderr, "error: rnusers ");
exit(-1);
} printf("%d users on %s
", num, argv[1]);
exit(0); }
View 2 Replies
View Related
Mar 10, 2010
I got an error that header file sys/ddi.h , did the system is missing something
View 2 Replies
View Related
Jan 25, 2010
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 ?
View 6 Replies
View Related
Aug 6, 2010
I've built a piece of hardware that communicates using usb. I was wondering could I make a libusb based program run on it's own without gcc/ libusb
View 10 Replies
View Related
May 17, 2011
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.
View 1 Replies
View Related
Jul 16, 2009
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...
View 4 Replies
View Related
Sep 16, 2010
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'
View 4 Replies
View Related
Jun 18, 2010
I need to install libssh2 on my CentOS 32bit server to get ssh2 extension of PHP working, after installation of this rpm, I still can't run "pecl install ssh2-beta" because it give me this error: configure: error: The required libssh2 library was not found. You can obtain that package from [URL] ERROR: `/tmp/tmp2ImZz1/ssh2-0.11.0/configure --with-ssh2=/usr' failed
View 1 Replies
View Related
Feb 21, 2009
I tried to install dropbox on my openSUSE 11.1(KDE 4.0) from a tar.bz2. After i extracted it to a folder Dropbox in Desktop.
I got this error trying to compile.
View 9 Replies
View Related
Apr 14, 2011
I've a FORTRAN program that I would like to compile in my machine. I've gfortran installed, so I issue the command: gfortran asc2bin.f write_geogrid.o
but this error are displayed
Code:
asc2bin.f:3.72:
INTEGER isigned,i,j,endian,wordsize,nx,ny,xllcorner,yllcorner,
1
Error: Invalid character in name at (1)
[Code].....
View 1 Replies
View Related
Dec 17, 2009
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.
View 4 Replies
View Related
Jun 28, 2011
I'm compiling a project that uses boost libraries (1.45.0) for a MIPS target, and when trying to compile with bjam I get the following error:
Code:
libboost_system-mt.a(error_code.o): In function `(anonymous namespace)::generic_error_category::message(int) const':
error_code.cpp:(.text+0x55c): undefined reference to `__glibc_strerror_r'
collect2: ld returned 1 exit status
View 3 Replies
View Related
Apr 13, 2011
I'm tring to run AMDOverdriveCtrl, since they don't have an RPM file for Fedora i tried to compile from source i followed the instruction in the readme files run the make command
Code:
% make
g++ -mwindows -s -pthread -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -ldl -o./Release/AMDOverdriveCtrl ./src/CFanSpeedPanel.o ./src/COvdrSettingsPanel.o ./src/CFanControlPanel.o ./src/CColorTempPanel.o ./src/BezierMath.o ./src/Color.o
[code]....
and tried to run the application, and i get this error message
Code:
$ AMDOverdriveCtrl
Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4,compatible with 2.6), and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6).
View 1 Replies
View Related
May 21, 2011
i am a new programer in c i have write a simple app and i have a problem with combiling my program include one header file and 2 c
fun.h
#include<stdio.h>
void f();
/******EOF*******/
fun.c
#include"fun.h"
void f(){
[Code].....
View 6 Replies
View Related
May 6, 2010
[root@shankar-lx src1]# make
gcc -c main.c
gcc -c database.c
gcc -c e_sqlite.c
gcc -o TEST main.o database.o e_sqlite.o /usr/local/lib/libsqlite3.so.0.8.6 -w -lpthread
[root@shankar-lx src1]# ./TEST
./TEST: error while loading shared libraries: /usr/lib/libsqlite3.so.0: ELF file OS ABI invalid
My application compiled well but when try to run, it is giving ELF file OS ABI invalid ERROR. What is this error.
Kernel version is 2.4-18
View 1 Replies
View Related
Sep 5, 2010
Geting the following error while compiling in gambas on ubuntu. What is a secret key ?
[code]...
View 2 Replies
View Related
Feb 15, 2014
I'm trying to install the calculator Qalculate from source so I download the tar.gz package for KDE from their official website to my ~/Downloads folder. I unzipped it with
Code: Select all tar xzf qalculate-kde-0.9.7.tar.gz
I moved the exploded folder to my /home/guest/ folder (my user-name is guest), I entered the qalculate-kde-0.9.7 folder and searched for a INSTALL or README file. Here's what the INSTALL file says to do. The INSTALL file says to run the following commands
Code: Select all./configure
Code: Select allmake
Code: Select allmake install
Code: Select allmake clean
After giving the first command, trouble started; here's what I got:
Code: Select allroot@aliquis:/home/guest/qalculate-kde-0.9.7# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
[Code] .....
This is impossible, as I am running a fully functioning kde system. What should I do? I don't find the kde version of Qalculate in Apper...
View 9 Replies
View Related
Jul 3, 2010
Is there an online resource to lookup error messages generated when compiling C++ code?
View 5 Replies
View Related
Aug 18, 2010
I have tried to compile several programs from source code and have into a similar error in each case. I try make the program and I get an error like: fail program confsdefs.h. Reading further into the log file, I see there is a long list of missing library files when I compile something like Samba 3.5.x:
[Code]...
I have searched for dependency information and used apt-get to add anything I can find. How can I identify and find the dependencies for source? I have checked the source documentation though typically does not list required packages. My other question is how to check the path used to locate the libraries? Given the length of the missing library list, I think the problem may be configuring make.
View 2 Replies
View Related
May 21, 2010
I'm interested in modding an open-source turn based game called Advanced Strategic Command or ASC, but to do that I need bunch of libraries. Installing those libraries is very easy in linux, I know but the thing is I'm working with windows in which the building of the libraries is a bit more complex, as you probably know. One of those libraries is the ligsigc++, I'm using VC++ but haven't been successful in building the libsigc++ in VC++. I considered making my life easier with Cygwin (a unix shell for windows) and simply executing ./Configure, Make. I's worked like a charm and the library dll it produced is named cygsigc-2.0-0.dll which made me wonder is compiling a library in cygwin to be linked with VC++ perfectly ok? That is is there any difference in compiling in cygwin and VC++?
View 2 Replies
View Related
Jan 10, 2010
I was wondering if there is an argument I can pass to the configuration file to have it use a library from a non-standard path to compile with - for example I would like it to use my perl located in /scratchbox/users/jeff91/usr/bin/perl instead of the standard /usr/bin/perl
View 3 Replies
View Related