Programming :: Compiling Lex Output As C++?
Apr 6, 2011Lex's (actually Flex) output contains this:
Code:
#ifdef __cplusplus
extern "C" int yywrap (void );
[code]...
Lex's (actually Flex) output contains this:
Code:
#ifdef __cplusplus
extern "C" int yywrap (void );
[code]...
I am searching for the IDE that can compile and debug a NASM code. I am using ubuntu 10.04 and I can make compile via terminal but I must view registers for educational purposes.
View 4 Replies View RelatedI am trying to cross-compile my Qt application for armhf on Jessie, so what I did was install qt5-default:armhf, but when I tried running qmake I found out that it contains also an armhf version of qmake so I was not able to run it.Then I installed the amd64 version to have at least a runnable version of qmake, but it was only to find out that qmake contains only hardcoded paths, so I could not use it for the armhf libraries, well I could but I had to run qmake (amd64 version) and afterwards open the makefile and change all paths from amd64 to armhf.
But as this is not so convenient I was wondering if there is a normal way to do this, I know you can compile the source yourself but I had quite a lot of problems with dependencies there. Is it possible with the standard repository binaries or should I just go back to compiling the source myself? Maybe I can compile only the building tools without building all the libraries I already got from the repository.
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.
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.
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?
I did see another topic on this forum regarding VSTs in LMMS, but it didn't solve my problem. I am running using the 64-bit testing branch of debian, which may be causing some of my problems. I tried compiling LMMS myself, but I ran into an issue with wine when it tried to compile RemoteVstPlugin.
It seems as though wine didn't install winegcc or any other tools like that. After a while, I did manage to find winegcc and some of the other tools in /usr/lib/x86_64-linux-gnu/wine/bin. I decided to add some symlinks in /usr/local/bin to point to winegcc, wineg++, winecpp, and winebuild. After that, it seemed to give a different error message, but still failed to compile. It now gives me the following error:
Code: Select all[ 83%] Generating RemoteVstPlugin
/usr/bin/ld: Relocatable linking with relocations from format elf64-x86-64 (/usr/lib/x86_64-linux-gnu/wine/wine/libwinecrt0.a(exe_entry.o)) to format elf32-i386 (RemoteVstPlugin.Azfbf1.o) is not supported
winebuild: /usr/bin/ld failed with status 1
[Code] ....
I may be missing some dependencies because I couldn't run build-dep without removing skype but I don't think that's the problem. I thought the above problem may have something to do with wine, so I was going to try compiling wine to. I ran into problems with that, and ditched that idea. I really don't know what to do anymore. I can't just disable VST support, because that's why I tried to compile LMMS by myself to begin with!
I have an odd thing. And thats the following:
I entered: gcc raw.c -m32 -g -static -o raw
And I got:
I installed all bin32 libs I am on a x64 system.
I have written a program that I would like to cross compile for x86 and x86_64 architectures. I have tried google and the search function here to no success, most information I find is too specific (instructions for a specific program), or dealing with cross compiling for windows on linux.Does anyone know of a tutorial dealing with straight making a 32 bit binary on a 64 bit processor (both are intel)?
View 2 Replies View RelatedHow 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 Relatedcompiling and linking using gcc: What does a file name with a suffix '.a' represent? If I have multiple .c and .h files, how can I link them together? How can I create the .a file?
View 6 Replies View RelatedI am trying to compile certain Linux general utilities like ls, lsof, ping, netstat with static linkers and not sure how do that. Does any one aware how to compile the application with statically rather than dynamically.
View 4 Replies View RelatedI`m trying to compile sources of kernel module which has been written for kernel 2.6.9. There were many changes in kernel headers since then in current kernel sources. I`ve found that old /asm/system.h was moved under architecture dedicated directory /arch/*/include/asm/system.h. Anyway during sources compilation I`m having errors related to kernel sources. It looks like there is something wrong with this /asm/system.h
Code:
../asm/system.h: In function �__cmpxchg�:
../asm/system.h:248: error: expected string literal before �LOCK_PREFIX�
../asm/system.h:254: error: expected string literal before �LOCK_PREFIX�
[code]....
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 RelatedI 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 RelatedI'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:
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...
Geting the following error while compiling in gambas on ubuntu. What is a secret key ?
[code]...
I have just started learning Device driver programming in Linux and am stuck in my first program. Its just to see init_module and cleanup_module calls to use printk and see results using dmesg. program is:
Code:
#define MODULE
#include<linux/module.h>
int init_module(void)
[code].....
I have set up Eclipse + CDT on an Arch 2010.05 install. I set up an eclipse project and added SDL as a dependency (see below):
Project -> Properties
* -> GCC C++ Compiler -> Preprocessor -> main=SDL_main
* -> GCC C++ Linker -> Libraries -> SDLmain SDL (in that order top to bottom)
* -> GCC C++ Linker -> Libraries -> Library Search Path -> /usr/lib/ (I verified that libSDL.a and libSDLmain.a are there)
This is the code I'm compiling. It's designed to just be a hello world style SDL app to see that everything is working.
[Code]...
I wanted to cross compile sms server tools(url)for arm-linux with arm-linux-gcc compiler but I can not this is all information that I have from it's error:
Quote:
[root@localhost smstools3]# ls
doc examples install.sh LICENSE Makefile package.sh README scripts src uninstall.sh
Quote:
[root@localhost smstools3]# cat Makefile
# Makefile
# If you change destination of executables, remember to change
# startup script (init.d/sms3) too.
#BINDIR=/usr/local/bin
BINDIR=/mnt/sd/Utility/sms/ ///I changed here for cross compilation
code....
I just finished building a cross-compiler for i386-elf. But when I try to use it, the terminal gives me this error:
Code: Select all/home/isaac/Cross-compiler/lib/gcc/i386-elf/4.8.2/../../../../i386-elf/bin/ld: cannot find crt0.o: No such file or directory
/home/isaac/Cross-compiler/lib/gcc/i386-elf/4.8.2/../../../../i386-elf/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
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...
I'm trying to compile a Linux kernel module called hello-2.c using the command "make -C /lib/modules/$(uname -r)/build M=${PWD} modules" (without the quotes) (which I found online), and the following is the (seemingly successful) output.:
Code: Select allmake: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64'
Building modules, stage 2.
MODPOST 0 modules
make: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64'
However, I don't see a hello-2.ko (in the same folder or anywhere else for that matter). I'm Using Debian GNU/Linux 7.6.
Everything I am doing is within a folder/directory called "thefolder" (without the quotes) in the "/tmp" directory (without the quotes).
Why I can't see a hello-2.ko, and what to do to get it?
I am wanting to get be able to upload and get stuff from dropbox on my powerpc install of wheezy. Debian does not have the app for powerpc machine in stable or testing. There is a thunar extension in sid but i do not want to risk breaking my system so I decided to grab the wheezy source and compile myself. I am sure I have all the dependencies however I am I am getting this error. See below
rican-linux@debian-ppc:~/Build/source/nautilus-dropbox-1.4.0$ debuild -us -uc
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: source package nautilus-dropbox
dpkg-buildpackage: source version 1.4.0-3
dpkg-buildpackage: source changed by Raphaël Hertzog <hertzog@debian.org>
[Code] .....
I am using makefile to complile all C Programming files. But certain files are not getting compiled and hence its object file is not getting generated. This is happening due to files haven't been modified for a long time. It seems that compiler knows that its object file is there hence no need to complie it actually it is not.
View 14 Replies View RelatedIs there an online resource to lookup error messages generated when compiling C++ code?
View 5 Replies View RelatedI want to test my system call that be goint to add to kernel, But when i finish compiling kernel, i found my system call code not work. the code i want to return the system time "struct timespec":
/*----------Start of mycall.c----------*/
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/kernel.h>
[code]....
so i want a method to test the new system call before compiling kernel.
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 RelatedI am writing an sample LDAP Plug-in on RHDS. While compiling plug-in file, i am getting an error related to missing header files(prtypes.h, prprf.h etc..) 'slapi-plugin.h' file is generated in the path /usr/include/dirsrv. But inside this file, they are using some other header files like prtypes.h, prprf.h, etc. But there is no files generated with this names. Because of this i am getting "No such file or directory" error for these files. I can get these header files from Netscape coporation(Thirdpary), but can we use the same header files for Redhat or is there any separate header files are there for RHDS.
View 1 Replies View Related