Programming :: No Output On C Using Gcc Compiler?
Jun 8, 2010
I am trying to learn C Programing and I'm having trouble on the output of my script. my script should count the characters in input but it doesn't give me any numbers..
here's my program code:
Code:
#include <stdio.h>
main()
{
double nc;
[code]....
View 14 Replies
ADVERTISEMENT
Jul 18, 2011
I am using g++ 4.5.2 I copied and tried a piece simple (Making a Class Writealbe to a Stream) program, from page 363 of book(C++ cookbook), Example 10-6 your can download and test by yourself [URL]
[Code]....
View 1 Replies
View Related
Feb 25, 2010
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables See `config.log' for more details.
View 4 Replies
View Related
Feb 20, 2010
I downloaded Go-OpenOffice from SlackBuilds.org, but I can't build it. make terminates with configure error: checking for C compiler default output file name. configure: error: in `/tmp/SBo/ooo-build-3.1.1.5': configure: error: C compiler cannot create executables See `config.log' for more details.
(I can't find config.log anywhere) I use a quite 'light' installation (no xap, ap), and I suspect that I have some unmet dependencies, but the error message provides no information about what software is needed (I've installed all dependencies listed on SlackBuilds.org). I'm using Slackware64-13 with Xfce
View 3 Replies
View Related
Jul 13, 2011
I installed Fedora on my machine. I'm very new at Linux but would like to start coding in C++. I would like to know the steps to write and compile a Hello World program using C++ in Linux. (I've been a Microsoft person all my life).
View 4 Replies
View Related
May 26, 2010
compile package C++ with GNU compiler under Linux, I can share my program's
View 3 Replies
View Related
Aug 11, 2010
I am using a arm compiler to build my program but getting following compiler error at the end -
init.c.text+0x2c): undefined reference to '__libc_csu_fini'
init.c.text+0x34): undefined reference to '__libc_csu_init'
View 1 Replies
View Related
May 26, 2010
I am using the C++ compiler G++ to compile my programs on Linux Mint 8 - Gnome.
I recently installed QT and when I tried to compile a simple "Hello World!" program it gave me this error:
Quote:
This is the code in HelloWorldQt.cpp:
Code:
I have tried using GTK instead but I get a similar error.
View 7 Replies
View Related
Dec 24, 2010
I'm reading about GNU CPP(GNU C preprocessor). In the CPP manual -> 1.1 Character sets:
Code:
After preprocessing is complete, string and character constants are converted again, into the execution character set. This character set is under control of the user; the default is UTF-8, matching the source character set. I think "under control of the user" means to use the option -fexec-charset=, right? And in the above part, it says pretty clear: "After preprocessing is complete", so the job -- "string and character constants are converted again, into the execution character set" -- should be done by the C compiler(compilation proper), not GNU CPP. Then the option -fexec-charset= should be an option controlling the C compiler, not the preprocessor. But in the GCC manual, this option is listed in the "3.11 Options Controlling the Preprocessor". I don't understand this, If this option is an option controlling the preprocessor, it conflicts with the CPP manual. How to understand this?
View 4 Replies
View Related
Feb 3, 2010
I have a large existing codebase that all compiles under Ubuntu 8.04 with g++ using Scons. I've been given the task of getting it to compile for Arm9 running uclinux. I have a arm-elf-g++ compiler that I need to use instead of the gcc version. I ended up borking my /usr/lib/scons/SCons/Tool/g++.py file to use arm-elf-g++ instead of g++, but I know that this is not correct, as I have to go edit that file every time I change compilers.
These are the 2 lines I switch out:
Code:
compilers = ['arm-elf-g++']
#compilers = ['g++']
I simply can not find anywhere in the scons documentation that indicates how to tell it to use a different compiler. It seems that it would go under "Environment" but beyond that I'm lost. The CPPPATH variable seems like it only tells scons where to find #include files. I suppose I could rename arm-elf-g++ to g++ and just set my path to find that one first, but that seems like a bit of a hack as well. It would also break other things on my machine.
View 3 Replies
View Related
Aug 20, 2010
I'm trying to figure out how pthreads are mapped from the compiler to the Linux kernel. The pthread prototypes are found in a compiler header file (pthread.h), yet the kernel would be responsible for scheduling the threads. So, how does the compiler resolve the pthread symbols at compile time?
View 1 Replies
View Related
Apr 26, 2010
is there any way of using wherey() of turbo c function in gcc compiler like we have for gotoxy(), clrscr() functions.....
View 2 Replies
View Related
Nov 20, 2010
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 Related
Jan 25, 2010
How can I disable structure alignment feature of gcc using command-line options ?I recently migrated to 64-bit OS, and doubt that I might be experiencing a structure alignment problem due to the new 64-bit architecture.I checked the sizes of the same C-style struct in both x86 and x86_64, and found out that they appear to be different by 20 bytes.I am not sure if this is due to structure alignment or the differences in data type lengths between two platforms.Hence, I will first disable the structure alignment feature, and then check the struct sizes again.
View 3 Replies
View Related
Dec 14, 2010
So for those of you who has built GCC from source would know that you can't install GCC without an existing GCC. So my question is, what would happen if all computers in the world suddenly just died, and all you had was the computer in front of you, and a copy of GCC 4.5. How would you install that?
I ask because I would like to install GCC 4.5 on my old powerbook G4 mac without installing a binary GCC provided by Tiger 10.4 disks. I would like to build GCC from source, without an existing GCC to complicate updating.
View 6 Replies
View Related
Feb 5, 2015
I have moved from MS directX to OpenGL on Linux Debian. My computer is running Jessie version with Gimp. I am trying to use several of the gl 4.0 functions but getting compiler error. I check for OpenGL version and appears to be version 1.5 .... How can I verify the correct openGL version and how can I upgrade to a moder version of at least 4.0?
View 4 Replies
View Related
Apr 24, 2011
My Linux: Fedora 14 x64
My gcc: 4.5.1
My Glibc: 2.12.90
target Linux: "Ubuntu 8.04.4 LTS" hardy
target kernel: 2.6.24-29-server x64
target gcc: 4.2.4 target Glibc: 2.7
I need gcc/g++ and fortran. I Googled and most documents I found are somehow outdated and targeting for ARM, not for other Linux.
View 8 Replies
View Related
Jul 9, 2010
I changed the complier PGI to Intel. But i had some error message p4_error: interrupt SIGSEGV: 11 This error message was occured using intel compiler I don't know what is the ploblem.
View 2 Replies
View Related
Sep 23, 2010
I am working for a product which was evolved over a decade. There I have some combination of C style coding and C++ coding in same libraries. I am landing on some instances where C style function is expecting forward declarations for some other function for which I can not declare (due to design and architecture). Is there any g++ compiler option that directs the g++ to look whole preprocessed file (because definition is there down in the preprocessed file) than only forward in the preprocessed file. All these years this code is working as we are using CC compiler and that looks entire preprocessed file than only in the forward direction.
<Sample Code
Header1.h file
Function1()
{
[code]....
if I can not include Header2.h first then Header1.h. I have to include Header1.h and Header2.h because on the design hierarchy in this product. Also the function definitions are in header files as they are either template functions or functions expanded through macros.
View 6 Replies
View Related
Jul 6, 2011
This is my first post. I am unable to call some of the fftw3 library functions in a very simple fortran code. The code is as follows (the filename is trial.f):
Code:
program trial
implicit none
[code]...
View 5 Replies
View Related
Aug 2, 2010
I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When I try to compile the source code using the cross compiler I am getting the below error message. I think this is something related to linker.
Code:
cow_shim_funcs_startup_shutdown.o cow_shim_utils.o ../../dm/cfg/cfgi.a ../../dm/pl2/libsas21xxpl.a ../../raid/pfk/libpfk.a
/home/Raghu/gcc/cross-compiler/ppc/tools/lib/gcc/powerpc-unknown-linux-gnu/4.3.1/../../../../powerpc-unknown-linux-gnu/lib/libgcc_s.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [app.out] Error 1
View 3 Replies
View Related
Jul 9, 2011
I am writing a C program which is contains Mysql header files and APIs but it can not compile it and its error is : Quote: undefined reference to
to all of Mysql APIs that I included their headers .In command line I compile my source like this with no problem: Quote: gcc test.c -Wall -o test -lz `mysql_config --cflags --include --libs`
I think code block does not have bold italic part of this command. How can I add this to code block to compile my project or those project that contains Mysql APIs (just my project not all of defined projects that has no relation to mysql APIs)with this gcc flags.
View 3 Replies
View Related
Jul 10, 2011
I am writing a C program which is contains Mysql header files and APIs but it can not compile it and its error is :
Quote:
undefined reference to
to all of Mysql APIs that I included their headers .In command line I compile my source like this with no problem:
Quote:
gcc test.c -Wall -o test -lz `mysql_config --cflags --include --libs`
I think code block does not have bold italic part of this command. How can I add this to code block to compile my project or those project that contains Mysql APIs (just my project not all of defined projects that has no relation to mysql APIs)with this gcc flags.
View 2 Replies
View Related
Feb 11, 2009
I have the plugin installed ok and have pasted in a C source file that I know works and am getting the following errors, I think because the linker options need to be set in some way. I cannot copy the errors but they all complain of implicit declaration of functions like this: -
warning: implicit declaration of function strlen
But I have the headers included, is this a linker problem? Here is the code -
#include <stdio.h>
#include <math.h>
int main(){
[code]...
View 2 Replies
View Related
Mar 5, 2010
As a result, I want to know what this error means, and how to correct it.Here is my code:
Code:
#include <iostream>
#include <cmath>
#include <cstring>
using namespace std;
[code]....
It is once I use the 'try_crack' function inside of main that I get this error.
View 6 Replies
View Related
May 12, 2010
My compiler won't find <new>. Since it's such a basic function, I'm a bit confused. Is <new> supposed to be in a file of its own? Where do I find it? And if it turns out to be missing on my computer, where can I find a <new> one? Or do you see anything else that I do wrong?
After some trying out, it seems I can't find stuff like iostream or any other basic stuff either. The compiler is prolly looking for them at the wrong place. Does anyone know how I change or add paths for the compiler to look in when using the "<>" operator?
View 2 Replies
View Related
Jan 28, 2010
As i am new to C++ i couldn't figure out how to input a file and make some change on the file and produce a output file. like this problem i have is.
"Program that processes an input file and produces an output file. The input file will contain lines of data, each containing two floating point numbers. The lines of the output file should contain the two numbers read and their average (with a '$' sign and 2 places after the decimal point)."
View 2 Replies
View Related
Apr 25, 2010
I have a file with something like** The total time for processing is 1245 seconds *when I doawk 'BEGIN{FS="The total time for processing"} {print $2 } ' fileI get correctly on screen 1245 seconds *but when I try to direct this to a file awk 'BEGIN{FS="The total time for processing"} {print $2 } ' file > outputthenoutput is empty ie the 1245 seconds * is not saved in ...Know why?
View 4 Replies
View Related
May 10, 2010
With the command "tail -300 /var/log/apache2/access.log | less" i can look in the log for the 300 latest visitors. and i wanted to ask if it's possiblle to get that command to run from a php file and if yes how ?
View 4 Replies
View Related
Apr 6, 2011
Lex's (actually Flex) output contains this:
Code:
#ifdef __cplusplus
extern "C" int yywrap (void );
[code]...
View 8 Replies
View Related