I develop C++ applications on CentOS 5.4 and we came across several inconvenient situations with gcc 4.1.2 like inability to debug local variables in class constructor which is a confirmed gcc bug (same problem with scoped variables).
I'm considering to upgrade to higher gcc version. What version should I choose for production environmen...
Once again, GCC is making me feel like an idiot for having trouble with the simplest things. I've included a header:
#include "PDL.h"
Then, I try to compile:
arm-none-linux-gnueabi-gcc -I/cygdrive/c/PalmPDK/include -I../lua-5.1.4/lua-webos/include -O2 -Wall -shared -nostdlib -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -lpdl
But ...
Specifically for C and C++, how many passes are used by default?
Does this number change depending on the level of optimization used? (it should)
Can it be changed directly?
I was searching for this information in http://gcc.gnu.org/, but googling using site:http://gcc.gnu.org/ did not yield anything.
Any pointers to any documentati...
I'm trying to install Python-Gammu on a mac running Snow Leopard. I successfully configured gammu with cmake and GCC 4, but am getting this error on install. It seems to indicate an improperly configured gcc, but i'm not sure what can be done about this.
Has anyone else run into similar problems with GCC on the mac?
[ 90%] Built targ...
Hi,
After a lot of internet research I implemented a small assembler routine in my C++ program to get the CPU's L1 cache size using cpuid.
int CPUID_getL1CacheSize() {
int l1CacheSize = -1;
asm ( "mov $5, %%eax\n\t" // EAX=80000005h: L1 Cache and TLB Identifiers
"cpuid\n\t"
"mov %%eax, %0" // eax i...
I'm currently at a point where I need to link in several modules (basically ELF object files) to my main executable due to a limitation of our target (background: kernel, targeting the ARM architecture). On other targets (x86 specifically) these object files would be loaded at runtime and a specific function in them would be called. At s...
Sometimes I need to use a gcc for cross-platform work, and sometimes gcc really amuses me with its warnings. For example:
#pragma once in a main file
This is very informative warning, but I really don't know what a 'main file' IS in terminology of gcc and WHY it must not contain #pragma once :). So, does any documentation exist tha...
I've installed XCode v3.1.3 and am having difficulties using the rumored GCC that is installed along with it. -- I'm certainly able to use the XCode IDE to compile my programs but would like the flexibility of also using the command line...
Where's GCC?
...
Which option should be enabled in gcc to generate 16-bit or 32-bit or 64-bit object code ? Are there separate options for generating each of the above object code type ?
...
I've been working a couple of small c++ projects using the nuwen.net minGW distro and I've run into a problem trying to link against the boost::filesystem library. I am invoking g++ like this:
g++ -g -Wall -pedantic -std=c++0x -static-libgcc -o main.exe main.cpp -lmingw32 -lstdc++ -lboost_system -lboost_filesystem
However, this result...
Hi,
I could not find any intrinsics for a simple xor operation.
See: http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
Are there really no way to use NEON instructions for this?
...
Hi all,
I am trying to build a simple iPhone app that calls several static libraries.
However, it seems when I include the linker flag "-ObjC" and "-all_load" (as I need to for one library), it causes the linker error:
ld: duplicate symbol
_OBJC_METACLASS_$_ASIFormDataRequest in /Users/XXXXX/Projects/AppName/Dependencies/Library1/lib1K...
Hi!
I am migrating a project from Linux to Xcode and I encountered a "version" problem..
I need a unique identifier at compile time for my dynamic stuff, on linux I was using the __ COUNTER__ preprocessor, but it seems that the gcc 4.2 used in Xcode doesn't know about __ COUNTER__ yet...
So, I was wondering what I could do to solve th...
I'm compiling some c++ code in MinGW GCC 4.4.0, and getting warnings with the following form...
warning: invalid access to non-static data member '<membername>' of NULL object
warning: (perhaps the 'offsetof' macro was used incorrectly)
This problem seems familiar - something I've tried to resolve before and failed, I think, but a wh...
Please take a look at this macro. It is used in Symbian OS SDK, which compiler is based on GCC (< 4 version of it).
#ifndef _FOFF
#if __GNUC__ < 4
#define _FOFF(c,f) (((TInt)&(((c *)0x1000)->f))-0x1000)
#else
#define _FOFF(c,f) __builtin_offsetof(c,f)
#endif
#endif
I understand that it is calculating offset to specif...
Hi,
I'm writing a SSE code to 2D convolution but SSE documentation is very sparse.
I'm calculating dot product with _mm_dp_ps and using _mm_extract_ps to get the dot product result, but _mm_extract_ps returns a hex that represents a float and I can't figure out how to convert this hex float to a regular float. I could use __builtin_ia3...
Hi,
I'm trying to build a shared library, and I get the following error:
libavformat.so: version node not found
for symbol
av_dup_packet@LIBAVFORMAT_52
ld:
failed to set dynamic section sizes:
Bad value
Does anybody knows what this error means? Host is i586-linux target is arm-linux
Edit: Resolved, see comments
...
Hi,
I'm trying to compile a file with the V8 the JavaScript Engine by Google. I installed scons and have compiled the V8 engine. But, here is where the problem lies, I stay in the V8 directory as they say and make a file named hello_world.cpp with the code:
#include <v8.h>
using namespace v8;
int main(int argc, char* argv[]) {
...
Hi,
I want to use Festival TTS API with CodeBlocks. I have created a new project, and added in build options>linker settings:
libFestival.a
libestools.a
libestbase.a
libeststring.a
I also added in the global compiler settings>search directories>compiler:
festival\src\include
speech_tools\include
I am using gnu gcc compiler (ming...
Using inline assembler [gcc, intel, c], how to check if the carry flag is set after an operation?
...