Programming :: GCC And G++ Build Results If The -march=TYPE Is Not Specified?

May 25, 2010

I'm sure this has been covered somewhere before, but I couldn't find anything and so figured I would post here. I have been using Linux OSes for the past couple of years and also using GCC/G++ for application development. However, I have almost always been on x86 systems and never gained much experience using the wide range of optimization options available.

My question is, if I do not specify the -march=PROCTYPE option, will GCC still be able to detect the current architecture and build the code accordingly? I primarily ask this because I am working with an x86_64 system, and specifying -march=x86_64 in my makefiles generates errors about it being an unknown processor type, even though the CPU and OS are X86_64. I know this sounds like a newbie question, but it's just ground I've never had to cover before until now.

View 7 Replies


ADVERTISEMENT

Programming :: Error - Array Type Has Incomplete Element Type

Jan 26, 2010

I'm trying to compile a program and it gives me the following:

I checked cmath-util.h:46 and cmath-util.h:48:

I'm not a C person, and the author is unavailable so far.

View 5 Replies View Related

Ubuntu :: Processor Type For New Computer Build?

Jul 21, 2010

A processor is very important to me and I'm curious what processor to get for a new computer build. I will be using Ubuntu for most things except iTunes, HD movies, and a few low spec requiring games on Win 7. I am building it as right now I have a half year old netbook that can do most things just fails at game play and movies but it's alright. And I have a desktop with just Ubuntu that's about the same quality but 8 years old. I want to build a computer that will be very fast for the next 4 years enough to get me to college and buy a nice laptop. I am on a small budget of around 500- 750 dollars. I have most things picked out but processor has me stumped. To me processor is a bit tricky to replace and I'd rather get a higher-end one to start and stick with that than buy another CPU two years down the road.

I don't mind upgrading RAM, GPU, and or even the HDD at a later point but I want to get the CPU as close to perfect as possible. First I heard AMD processors tend to be a bit hot. I was wondering what cooler is $50 or less that does a great job at cooling a AMD AM3 socket CPU. I do plan to overclock a very small bit perhaps up to .3 GHz plus max. First I was thinking a nice core i5 at $200 and never really checked anything else. Then, I was thinking a hexa-core at 2.8 GHz I think but decided too much and didn't need six cores. The AMD socket type also supported USB 3.0 which I instantly fell in love with. Then I found a quad core Phenom II x4 black edition at 3.20 GHz for around $160.I liked the core unlocker and it looked incredible. Now I'm rethinking a bit again.

I found a dual-core that is same thing as the other AMD one above except well only two cores. I think that would do me fine I'd I'd save $60 by getting 2 less cores. With the things I use a computer for (Ubuntu, Win7, HD quality playback, minor gaming like Runescape, and small multitasking like openoffice a browser or two and perhaps some pictures, game or movie.) I also want to be able to do this quickly for the next 4 years without a hiccup or at least to a minimum if possible. I really don't want to upgrade CPU once I get that bad boy in there. I also want it ready for higher versions of Windows like Windows 8 is supposedly coming sometime in 2012 I've heard. I just want the best CPU to be fast and efficient, run cool, and work well for me for the next 4 years.

View 6 Replies View Related

Server :: Build A PXE Boot On Rhel5/centos5 From Which All Type Of OS?

Sep 15, 2010

I want to build a PXE boot server on rhel5/centos5 from which all type of OS(Linux distros,Windows - xp,vista,7) these can be installed on any client on my LAN . I have tried it for some linux distros with TFTP ,but unable to add windows.

View 2 Replies View Related

Software :: Get The Last Sunday Of March And October In Shell Script?

Mar 18, 2011

ssist me to run the cron job only on last Sunday of March and last Sunday of October

View 11 Replies View Related

Slackware :: Digikam 1.2.0 On 64-current Of 31st March, 2010?

Apr 1, 2010

I just tried to build Digikam 1.2.0 using the SlackBuild script from SlackBuilds.org for version 1.0.0. While Lensfun 0.2.5 and Kipi-Plugins 1.2.0 compiled and installed without problems, the Digikam build stops at 97%. Here's the log:

[Code]...

View 8 Replies View Related

Programming :: Convert The String Data Type To Other Primitive Data Type?

Mar 4, 2011

I am trying to generic way to convert the string datatype to other primitive data type. To achieve, i used Template . But i getting error and couldn't resolve the issue and error reported is also clueless.

Code
====
#include <vector>
#include <iostream>
#include <string>

[Code].....

View 7 Replies View Related

Programming :: Get Similar Results Using Both Gcc And G++

Mar 7, 2011

consider these lines of code and their outputs:

[CODE]
int C = 0;
fprintf(stdout, "
(C, ++C) Bef = %d, Aft = %d
", C, ++C);
fprintf(stdout, "(C++, C) Bef = %d, Aft = %d
", C++, C);

[Code].....

The only one that looks right to me is the second one. I get similar results using both gcc and g++.

View 4 Replies View Related

Programming :: Arrange The Results In The Shell?

May 10, 2010

Im having problems with this little thing in a C example Im doing. I want to show in the shell like this example:

Name Birthday
Tomas 13
Adrian 24
Nate 15

Im trying to use the printf function but the names doesnt have the same lenght. So I cant do it like this:

printf("Name Bithday
");
printf("%s %d
");

View 4 Replies View Related

Programming :: Store The Results In An Array?

Apr 13, 2010

i have a loop which produces new value everytime it runs. i want to store the results in an array. how can i do dat??

loop is like:
a=0
declare v
while ((....))
do
v[$a]="$r"
let a=a+1
done

while doing this it is not treating v as array but as variable and it is overriding the value and old value is lost..i am using bash shell version 3.00.15

View 5 Replies View Related

Programming :: Get Search Results To Array By Awk?

May 5, 2010

I have this multiline variable code...

View 5 Replies View Related

Programming :: IPv6: Using Results From Recvfrom()

Jul 25, 2011

I have a socket library that I tinker with from time to time. Lately, I decided to expand it to support IPv6.

One of the issues I am having is sending data, using sendto(). When the server receives data from a client, using recvfrom(), it does not retain the sockaddr_in information, but instead provides the callee the IPv6 address and port number from where the data originated. See here:

Code:
int
UDPSocket::recv(char* buffer, size_t bufferLen, std::string& sourceAddr, unsigned short& sourcePort)
{
sockaddr_in sin;
socklen_t sinLen = sizeof(sin);

[Code]....

View 8 Replies View Related

Programming :: Splitting Results In More Web Pages?

Apr 1, 2010

I've a web page where I can search information in my database.Sometimes results of search operation are more of fifty.How can I split results in different web page as it happens for example in any search engine or operation

View 7 Replies View Related

Fedora :: Install "inkscape" \ Checking Build System Type... I686-pc-linux-gnu?

Jun 6, 2011

I tried to install "inkscape", but when I typed Code:makeit said:

Code:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu

[code]....

View 6 Replies View Related

Programming :: Unusual Encryption Results With Php's Mcrypt?

May 30, 2010

I have a simple class that encrypts strings. It seemed to be working fine until I tried to compare the decrypted values to the original. below is the output of the php code. It appears to be decrypted but the length is incorrect.

String Before Encryption: a text string
String Length Before Encryption: 13
String After Encryption: rew2iSYotruIpmJ3llos3A==

[code]...

View 7 Replies View Related

Programming :: Expect/TCL - Unable To Get The Correct Results

Feb 8, 2011

I'll post the entire code here, and then specifically highlight what is just failing in a fashion I'm apparently incapable of fixing a few hours later:

Code:

#!/usr/bin/expect
# The script should be called with a file in the directory called sshServerList
# That file has the following format:
# Line # | Contents of line

[code]....

I've had all kinds of different results and problems, but I've never been able to successfully log into multiple servers, though the first server in the list most times works okay (though might not on this iteration). I'm a bit hack and slash and I would be very greatful not only for a solution, but any tips on how I should have done this and places where I could clean up my code.

View 1 Replies View Related

Programming :: Finding Particular Ranges Of Results In MySQL?

Jan 20, 2009

How do I find for example the 4th to the 9th result in a particular SELECT query?

View 6 Replies View Related

Programming :: TCL / Expect - IF Results Are Different Then Send A Command?

Dec 11, 2010

trying to see IF i dont get the right results repeat the command until it will or quit after 3 tries....

expect -exact "->"
send -- "test_read_register 0,0x37
"
if {! [regexp {Address 0x00000000} do send -- "test_read_register 0,0x37

[code]....

It should read

Read: Address 0x00000037, Data: 0x0000000b

but sometimes it comes out to this

Read: Address 0x00000000, Data: 0x00000000

therefore ill have to run the command again IF I Dont get the right results...

View 1 Replies View Related

Programming :: Encryption / Decryption Program - Getting Different Results Every Time

May 9, 2011

I am having trouble with encryption/ decryption program. The program goes out and finds the file I want it to, encrypts it into a continuing series of a single repeated negative number, then generally decrypts(or should i say re-encrypts)it into a widely repeated character, different but same results every time.

[Code]....

View 3 Replies View Related

Programming :: List Specific Files And Delete Results?

Jul 8, 2011

I ran the command:

Code:

ls -ltr | head -n40

I'd like to delete all the files listed...

View 2 Replies View Related

Programming :: Looping Over Mysql Query Results In Bash?

Sep 15, 2010

I am querying a single string column in a table. The string values have spaces in them. I want to loop over each value in bash. I set IFS to split lists on newlines instead of spaces. When I try this, it is splitting the list of results on the actual character 'n', not the newline ''.

DATA=`mysql -u root -ppassword --silent 'SELECT name FROM table_a;'`
IFS=$'
'
for i in $DATA; do
echo "item = $i"

[Code]....

View 5 Replies View Related

Programming :: Shell Script Query - How To Achieve The Results

Feb 7, 2010

how do I achieve the result but here is the story. I have a script which prompts for the IP Address and read that value and validate if reachable. If not then it should keep on prompting until the IP is reachable. I tried using until loop as well as while loop but dang..Here are the codes

#!/bin/bash
IP_Feed () {
echo -n "Give me IP : "

[code]....

View 4 Replies View Related

Programming :: Same Program Runs Multiple Times But Get Very Different Results?

Dec 7, 2010

I used wait4 to time a child process. but the results differ each other dramatically. why?my core source code lists as below.to the point: in linux 2.6 kernel, how to time a process with a high precision. and, only its user-time rather than the elapsed time???

static struct rusage ruse;
static pid_t u_pid;
int main(int argc, char *argv[])
{
int i;
code....

View 14 Replies View Related

Programming :: Build A Simple Program For C Programming Class?

Feb 12, 2011

im trying to build a simple program for my C programming class, this is the source code

#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;

[Code]...

i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?

View 5 Replies View Related

Programming :: Save The Results Of A Fortran Loop In A Text File?

Nov 2, 2010

I am trying to store the results of my code to a separate text file.But the problem is, as my results comes from a loop, my text file shows only the last result, not all of them.Like if the loop runs 5 time the text file shows the result for the 5th step.But i need to store all of them (1 to 5).Can I use awk to print the output field and store to another file and creat a new line so that the next output field goes to a new line?(just an idea, dont know).

#!/bin/basth
for (( i=1; i<=5; i++))
do
./file.exe > output.txt
done

View 2 Replies View Related

Programming :: Build Ip Packet With C,socket Programming?

Jan 30, 2011

How can we build a packet using C?we have a structure called sockaddr_in which is use to for IPv4,so that we can define address,port and etc in this way:

Code:
struct sockaddr_in sock;
sock.sin_family=AF_INET;

[code]...

View 5 Replies View Related

Programming :: Bash : Searching For Info And Changing The Color Of Keywords In The Results?

May 5, 2011

(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:

Quote:

#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)

[code]....

*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.

View 4 Replies View Related

Programming :: Script To Read Active Squid Logfile And Output Results To Html Based On Conditions?

Mar 12, 2010

Basically the requirement of the script are :

1. need to run like a daemon which will read an active squid logfile in a refresh pattern of 5 minutes

2. calculate the total number requests based on different domains that the client access

3. calculate the total of number of requests based on different domains as well as the turnaround time of these access is more than 5 sec that the client access

4. calculate percentage of item 3 over item 2

5. report the results in html format as follows:

Domain Name Total req Req > 5 sec % of req > 5 sec

6. able to access the results from web browser.

View 8 Replies View Related

General :: Saving The Results Of The Time Command While Discarding The Results Of The Command Being Timed

Apr 6, 2010

I'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't do what I want:

$ time ./foo > /dev/null >> output_from_time_command.txt

View 1 Replies View Related

Programming :: Build A Spi Program Using C++?

Jan 19, 2011

I'm trying to build a spi program using c++. I'm able to perform half-duplex transfers using the read/write functions, it works perfectly. Now I need to perform a full-duplex transfer, but I'm facing some problems. When I try to receive more than one byte, the slave returns to me only one byte.Ex: I send: FF FF FF FF FF The slave must return: 03 02 00 13 04 But what is happening is:

1st Transfer:

tx: FF FF FF FF FF
rx: 03 00 00 00 00

2nd Transfer:

tx: FF FF FF FF FF
rx: 02 00 00 00 00

[code].....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved