Hi,
I am just starting programming ansi c with gcc under ubuntu (9.04). I get following error messages:
error messages:
main.c:6: error: expected identifier or ‘(’ before ‘/’ token
In file included from /usr/include/stdio.h:75,
from main.c:9:
/usr/include/libio.h:332: error: expected specifier-qualifier-list before ...
Hi!
I went through this tutorial to create a MobileSubstrate addon. I could compile the example hook without errors.
But as soon as I add
#import <SpringBoard/SBAwayController.h>
in ExampleHookProtocol.h and
SBAwayController *awayController = [SBAwayController sharedAwayController];
in ExampleHookLibrary.mm (as the first line of...
I am trying to build an old 16 bit DOS like OS.
My example kernel code:
asm(".code16\n");
void putchar(char);
int main()
{
putchar('A');
return 0;
}
void putchar(char val)
{
asm("movb %0, %%al\n"
"movb $0x0E, %%ah\n"
"int $0x10\n"
:
:"r"(val)
...
GCC documentation states in 6.30 Declaring Attributes of Functions:
naked
Use this attribute on the ARM, AVR, IP2K, RX and SPU ports to indicate that the specified function does not need prologue/epilogue sequences generated by the compiler. It is up to the programmer to provide these sequences. The only statements that can be s...
I just spent a few hours pulling my hair out over this. I'm trying to get gcc to compile a file from within PHP.
$command = "/usr/bin/gcc /var/www/progpad/temp/tNu7rq.c -o /var/www/progpad/temp/tNu7rq.out";
exec($command, $output, $returnVal);
echo $returnVal."<br />"; //returns 1 and no output file created.
I'm running th...
I'd like to minimize synchronization and write lock-free code when possible in a project of mine. When absolutely necessary I'd love to substitute light-weight spinlocks built from atomic operations for pthread and win32 mutex locks. My understanding is that these are system calls underneath and could cause a context switch (which may be...
I am looking for a free static checker for C99 code (including GCC extensions) with the ability to explicitly say "these preprocessor macros are always defined."
I need that last part because I am compiling embedded code for a single target processor. The compiler (Microchip's C32, GCC based) sets a macro based on the selected processo...
I'm having a weird problem
i'm trying to read a string from a console with scanf()
like this
scanf("%[^\n]",string1);
but it doesnt read anything. it just skips the entire scanf.
I'm trying it in gcc compiler
...
How to create dll using gcc compiler/Mingw for visual basic?
...
INTRODUCTION
Hi,
I am very new to C++, is my 1st statement.
I have started initially with VC++ 2008 Express, I've notice that GCC becomes kind of standard so I am trying to make the right steps event from the beginning.
I have written a piece of code that connects to MSSQL Server via ADO, on VC++ it's working like a charm by importin...
I'm looking for the C grammar in GCC source code, more specifically for the grammar in the yacc/bison form.
...
My Problem is this:
My framework contains public and private headers - the public headers import private headers in the framework
My app that links against this framework imports public headers
Now when I compile it, XCode complains about missing files (the private headers that are indirectly imported via the frameworks public header...
Hi. I am building a 16 bit operating system. But character array does not seem to work.
Here is my example kernel code:
asm(".code16gcc\n");
void putchar(char);
int main()
{
char *str = "hello";
putchar('A');
if(str[0]== 'h')
putchar('h');
return 0;
}
void putchar(char val)
{
asm("movb %0, %%al\n"
"movb $0x0E, %%a...
I'm working with an embedded Linux deployment and am using a cross compiler tool chain that doesn't compile I2C library function calls.
How do I determine the precise versions of the libraries on the system so that I may rebuild the tool chain?
I don't intend to replace the libraries deployed, as I do know they work (including I2C), s...
I have included the header netdb.h, where getaddrinfo is included, but gcc issues this warning:
warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gcc -m32 -static -s -O2 -std=c99 -D_POSIX_C_SOURCE=200112L myprogram.c
How can I statically comp...
I've been trying to solve this for a few hours now.
I am compiling some c files using gcc. The files require libpbc, so I am using the -L flag to point gcc at the directory which contains libpbc.so.1. The code compiles without error yet when I attempt to run it I get the following error message:
./example.out: error while loading sh...
I want to supply the shared libs along with my program rather than using the target system's due to version differences:
ldd says my program uses these shared libs:
linux-gate.so.1 => (0xf7ef0000)(made by kernel)
libc.so.6 => /lib32/libc.so.6 (0xf7d88000)(libc-2.7.so)
/lib/ld-linux.so.2 (0xf7ef1000)(ld-2.7.so)
I have successfully lin...
I have an application developed under Linux with GCC 4.2 which makes quite heavy use of stringstreams to wrap and unwrap data being sent over the wire. (Because the Grid API I'm using demands it). Under Linux everything is fine but when I deploy to SunOS (v5.10 running SPARC) and compile with GCC 3.4.6 the app hangs when it reaches the p...
When unoreded_map support was added to gcc?
I'm using gcc 4.1.1 shipped with RHEL 5.3.
It looks like unoreded_map is missing. Is there a way to add it manually?
...
Hi,
I have some old hardware with an old version of say SuSE linux running on it. Now I have this fancy development machine running Ubuntu 9.10. Some of the tools I use to compile my C app (written in Python 2.6.x) are not available on the old SuSe box. So... is it possible to compile for that old machine on my dev box?
I have the foll...