I want to run 'make install' so I have everything I need, but I'd like it to install the things in their own folder as opposed to the system's /usr/bin etc. is that possible? even if it references tools in the /usr/bin etc.?
...
Hi there,
I used the following piece of code to read data from files as part of a larger program.
double data_read(FILE *stream,int code) {
char data[8];
switch(code) {
case 0x08:
return (unsigned char)fgetc(stream);
case 0x09:
return (signed char)fgetc(stream);
case 0x0b:...
We are on HPUX and my code is in C++.
We am getting "BUS_ADRALN - Invalid address alignment" in my executable on a function call.
What does this error means?
Same function is working many times then suddenly its giving core dump.
in GDB when i try to print the object values it says not in context.
Any clue where to check?
Thanks in Adv...
Currently I have the following:
float some_function(){
float percentage = 100;
std::cout << "percentage = " << percentage;
//more code
return 0;
}
which gives the output
percentage = 100
However when I add some std::endl like so:
float some_function(){
float percentage = 100;
std::cout << "percentage = " ...
I am using an older system that has gcc 2.95.3, I have to link in two objects that although they have nothing to do with each other, they each have similarly named methods. I can't rename either of them, but I would hope there is a way to build them as to not have the linker complain. The methods it is complaining about are each intern...
[Edit: It seems this is an issue on gcc versions prior to 4.4, I got confused because of a gcc bugzilla entry reporting it for 4.5 (latest). Sorry, I should've tested with more recent versions. Still, the problem is somewhat valid as most people don't run gcc 4.4+.]
Is it possible to tell the compiler the variable used in a switch fits ...
Can anyone tell me if C++ lambda expressions will be supported by GCC for the iPhone in the future?
Obviously Apple have their custom 'block' support so I wondered what this may eventually mean in terms of portable C++0x code to the iPhone platform?
...
Hello, I want to build a static library that requires openssl for iPhone. It can't find include files from openssl. How should I tell the compiler where to look for those header files? Thanks.
EDIT: I'm trying to build librtmp for iPhone, for arm not for simulator. Just to test something. Im not building it from xcode. I think i have fo...
I want to write a bunch of optimizations for gcc using genetic algorithms.
I need to measure execution time of an assembly functions for some stats and fit functions.
The usual time measurement can't be used, 'cause it is influenced by the cache size.
So I need a table where I can see something like this.
command | operands | operands s...
Does GCC have an equivalent compiler switch to VC's floating point model switch (/fp)?
In particular, my application benefits from compiling with /fp:fast and precision is not a big deal, how should I compile it with GCC?
...
I found a strange issue when porting my code from Visual Studio to gcc. The following code compiles fine in Visual Studio, but results in an error in gcc.
namespace Baz
{
template <class T>
class Foo
{
public:
void Bar()
{
Baz::Print();
}
};
void Print() { std::cout << "Hello, world!" << st...
I'm trying to get GCC (or clang) to consistently use the SSE instruction for sqrt instead of the math library function for a computationally intensive scientific application. I've tried a variety of GCCs on various 32 and 64 bit OS X and Linux systems. I'm making sure to enable sse with -mfpmath=sse (and -march=core2 to satisfy GCCs requ...
Let's say I have a source file, say helper.c, which gets compiled into an object library (helper.a). Now, this uses functionality from many system libraries, so currently when I want to link helper.a into an executable, I end up having to list all the dependencies:
gcc main.c helper.a -o my_app -lrt -lpthreads ...
What's the common ap...
int a=5;
printf("%d %d %d\n",a++,a++,++a);
Output on Gcc :
7 6 8
Can someone please explain the answer.
I apologize if this question has been repeated but i wasn't able to find it.
Thanks!!
...
I'm testing to make sure that my cross compiler is working. When I compile hello world it seems to compile fine but when I change hello.cpp to the same program that loops 1000 times the elf file generated is exactly the same size. No matter what changes I make the file is always the same size and as far as I can tell, has the same cont...
I'm following this guide mostly to compile gcc on windows:
http://www.aristeia.com/Misc/gcc4ForWindows.html
The difference is that I am using msys 1.10 and trying to build gcc trunk from SVN. the source tree compiles fine on linux, however when I attempt to build on windows, i get the following error upon running the configure script.
...
Hi,
I'm developing an iPhone application, and after making small changes to my code, when I tried to build I suddenly got the following build error when XCode tries to create precompiled header:
i686-apple-darwin10-gcc-4.2.1: n: No such file or directory
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 fa...
Hi,
I want to provide the type of an element as parameter to an initialization of an array of pointers to element of an unknown types
something like
void* init(type t)
void* array = malloc(sizeof_type(t)*10));
return array;
}
and later call for example
init(typeof(int))
But I was not able to figure what is the return type ...
I have an iPod touch and iPad with gcc installed on them. However, everytime I try to compile my programs they always fail. I am trying to write c programs for the terminal, not GUI. I am missing the standard c/c++ libraries (stdio.h, etc.). Can anyone tell me where I can find these libraries?
...
I am trying to convert a math library written with VS so it will compile though GCC. The trouble is, I have a lot of overloaded operators that look like this:
template<typename T>
inline quaternion<T> operator+(quaternion<T> &a, quaternion<T> &b)
{return quaternion<T>(a.x+b.x,a.y+b.y,a.z+b.z,a.w+b.w);}
and so on.
The problem is: Thes...