Skip navigation.
Home
The QNX Community Portal

View topic - I added a library to executable, now I get "syntax erro

I added a library to executable, now I get "syntax erro

Discussion about the QNX6 OS.

I added a library to executable, now I get "syntax erro

Postby CptanPanic » Thu Sep 09, 2010 2:20 pm

As title says, I added a new library to my executable, now I get "syntax error: `(' unexpected" when I try to run it. I do not get any errors linking. And the library is all that I added. How can I debug it? I am on QNX 6.2.1 on a x86.

Thanks,
CP
CptanPanic
Active Member
 
Posts: 36
Joined: Wed Jul 14, 2004 6:31 pm

RE: I added a library to executable, now I get "syntax

Postby mario » Thu Sep 09, 2010 2:52 pm

You added it wrong, the "syntax error: `` means the executable is actually not a real executable.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby seanb » Thu Sep 09, 2010 2:53 pm

You probably built for the wrong architecture (eg trying to run
an arm executable on x86).

-seanb
seanb
QNX Master
 
Posts: 133
Joined: Fri Jul 28, 2006 5:36 pm

Postby CptanPanic » Thu Sep 09, 2010 3:03 pm

I have some more information. If I simply add this library to the linker command using -lmylibary, right next to all the other libraries, then the executable created is not recognized as a valid executable. I don't even get an warning with the linker. Is there an option I can give it to help me figure out what is wrong?
CptanPanic
Active Member
 
Posts: 36
Joined: Wed Jul 14, 2004 6:31 pm

Re: I added a library to executable, now I get "syntax erro

Postby CptanPanic » Mon Feb 13, 2012 6:56 pm

I am getting this problem again, seemed last time to have to do with duplicate symbols that were not being warned about, but were causing linker not to link correctly. Any ideas on how to debug this?
Thanks
CptanPanic
Active Member
 
Posts: 36
Joined: Wed Jul 14, 2004 6:31 pm

Re: I added a library to executable, now I get "syntax erro

Postby CptanPanic » Mon Feb 13, 2012 9:56 pm

For prosperity sake: I was able to find the problem. I was missing an object file as part of the final executable. No idea why it doesn't complain about it.
CptanPanic
Active Member
 
Posts: 36
Joined: Wed Jul 14, 2004 6:31 pm


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 2 guests