Programming :: Compiling A C++ Program Including Libpq-fe.h Using Cygwin
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
ADVERTISEMENT
May 17, 2009
I have a program that is completed under Linux, it requires library tidy, PCRE and libcurl, which could be found in Cygwin too.
I could compile my linux program through Cygwin and produce an EXE file, however it do require 'cygwin.dll' installed by the users.
I am wondering if I could have someway to produce out a stand-alone EXE file that could run independently from Cygwin ? ( I don't mind to combine that cygwin.dll and the EXE together for a larger EXE file).
View 1 Replies
View Related
Oct 14, 2010
New to this kernel stuff But not too new to C/C++. I'm trying to compile the linux kernel on a PC, that is running Windows XP 32 bit, using Cygwin. I keep getting the error saying:
Error: Not ELF
make[2]:*** [scripts/mod/elfconfig.h] Error 1
make[1]:*** [scripts/mod] Error 2
make:***[scripts] Error 2
Every time I try to compile it from the main directory of the source, which I hope is what I'm supposed to do, I always get this.
View 14 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
Jun 26, 2011
I want to compile Firewalk in cygwin, But error compiling libnet occur:
Firewalk-0.99.1 #./configure
loading cache ./config.cache
checking host system type... i386-pc-cygwin32
checking target system type... i386-pc-cygwin32
checking build system type... i386-pc-cygwin32
checking for gcc... gcc .....
checking for PacketSetMode in -lpacket... no
configure :erroracket lib not found
What is "Packet Lib"? I have compile Plib Package, but the this error occurs again!
View 1 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
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
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
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
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
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
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
Jun 16, 2010
I'm trying to make my program as small as possible. Currently it's down to 17.8 KB, but I'd like to get it smaller (I know, I'm insane). Is there a way to not use the "#include" directive to include the entire header, but rather to just load only the stuff I need? For example, I just want to include 'sprintf' and 'printf' from stdio.h, not the entire header. Is this possible? Or am I misunderstanding some fundamental element here?
View 14 Replies
View Related
Feb 11, 2010
write a script in bash or shell to add the numbers between and including two numbers
View 3 Replies
View Related
Jul 29, 2010
Say, I have a header file containing all required includes:
Code: /* global.h */
#include <stdio.h>
#include <unistd.h>
...
#include <dirent.h>
#include <signal.h>
... /* and so on */
I have several modules in a program (*.h *.c files) and in each *.h I include global.h, then they are included in corresponding *.c files. And I receive strange messages from compiler, like a "warning: implicit declaration of function fdopendir", "error: expected declaration specifiers or '...' before 'siginfo_t' ", "error: 'DT_DIR' undeclared..." though these types, functions and constants are all declared in system headers. What does it mean?... Compiler is GCC 4.4.4-2, system is Fedora 13 x86_64
View 9 Replies
View Related
Jul 26, 2011
I have a tsv file that I'm trying to break down, line by line, then column by column so to speak. The file is a list of exported usernames, passwords, and display names from an email server, I need each separate to be used in other commands to provision the new server. My problem is, each display name contains a space, as usual with people's names. Here is the script for reference:
Code:
while read line
do
uname=`echo $line | awk '{ print $1 }' >> works`
pass=`echo $line | awk '{ print $2 }' >> works`
[code]....
View 14 Replies
View Related
Jun 22, 2011
I am trying to compare two filenames including the paths. Basically if two paths are similar then my program wants to display message. So I need to check for if two pathnames are same in the sorce and destination. So I was trying for the code to compare tow filename sincluding "" and if the Parent FIle Path is found in the child file path then I need to displays ome message. I was trying to modify something like this:
#!/bin/ksh
# Sample script
file1="C:TextLatestArticleNews.txt"
[code]....
View 7 Replies
View Related
Nov 17, 2008
I need to write a batch file for windows that automatically starts the cygwin tool in windows and executes the unix scripts.Previously we had these scripts in unix server.Now we need to migrate them to Windows server.For this reason we are using cygwin tool that allows the scripts to be executed on Windows server.We had written a batch file that starts the cygwin tool,but we were not able to execute the unix scripts.How can we write a batch file such that it executes all the unix scripts in cygwin.
View 5 Replies
View Related
Dec 6, 2010
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:
[code]..
View 9 Replies
View Related
Apr 29, 2011
i got a sample.c which generate a linked list for sorting according to the number generated. then i want to split the sorting function into a header file. and it looks like the sort function in the header file could not access the linked list in the main. the error is dereferencing pointer to incomplete type
sample.c
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
[code]...
View 2 Replies
View Related
Jul 1, 2010
I have a small script that takes input from one file, and uses this input to do a find/replace (with sed) to make an executable snmp trap.The input file could look something like this :JOHBURG SOUTH AFRICAOSLO NORWAY..etcThe script takes the input from this file, and preserves all words in one line as a variable (so that the variables are "JOHBURG SOUTH AFRICA" and "OSLO NORWAY", instead of JOHBURG, SOUTH, AFRICA, OSLO, NORWAY.This is working ok (in the given example, I get two variables).sed is supposed to take this variable, and use it to substitute "HITME" with the new variable.
#!/bin/bash
N=0
cat tutticodes | while read LINE
[code]....
View 21 Replies
View Related
Jun 13, 2010
I have been able to find repos that contain php 5.3.2 and Pg 8.4.4, but I can not find on that provides an RPM where php is built against Pg 8.4. It is usually 8.1. I also have not been able to figure out if yum can force a rebuild based on the fact that I actually got the correct versions installed, just not using each other. I simply would like to get php built with Pg 8.4 and have it work.
I have found and used the remi repos, but again although he has rpm for each the php is not built against the latest pg
View 1 Replies
View Related
May 28, 2010
Code:
g++ hworld.cpp `wx-config --libs` `wx-config --cxxflags` -o hworld
hworld.cpp:5:20: error: wx/wx.h: No such file or directory
(snip)
I looked at other topics with similar problems and I have both wxGTK and wxGTK-devel installed. I'm pretty sure the method of compiling is correct.
View 4 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
Feb 5, 2011
Recently i have installed fedora 13 my laptop but when i try to compile a c program it says that gcc command not found.
i think repo file must be created first but i dont know how to create a repo file in fedora 13
or is there any other solution.
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
Apr 23, 2011
I am trying to install postgresql db for using with metasploit on my ubuntu 10.10 instln. I am using the following guide :-
Quote:
[URL]
I however, could not finish the step with installing libpq-dev which is required to install the db_driver postgresql. I am using
sudo apt-get install libpq-dev it complains about certain dependencies which are unresolved. I tried out the synaptic and all the repositiories are added incl the mediubuntu !
View 5 Replies
View Related
May 25, 2010
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
View 2 Replies
View Related