Hi,
I'm new to Linux, and playing with my first few programs.
I'm getting a >> "<myPath>/helloWorld": not an executable format: File Format not recognized << error from gdb when it attempts to load the executable.
Well, to be more precise….
If my HelloWorld.c is:
Code:
#include <stdio.h>
int main()
{
printf("Hello world\n");
return (0);
}
Then I can execute the program fine (./helloWorld), as well as debug it (gdb ./helloWorld). However, if I change the program to:
Code:
#include <stdio.h>
#include <dc1394.h>
#include <camera.h>
int main()
{
dc1394_t * pLibDc; // LIBDC1394 context
pLibDc = dc1394_new ();
printf("Hello world\n");
return (0);
}
Then it still executes fine (./hellowWorld), but I get the above error message when I try to dbg it. The shared library in question, is the libdc1394 library for control of 1394 cameras. It seems to be working fine, as I can call all sorts of functions in the library and they do the right thing…. But I just can't get it to work under gdb.
for what it's worth, I'm using Anjuta to 'build' my program (which calls the gcc for me).
Any thoughts?
Thanks.