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

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

You added it wrong, the "syntax error: `` means the executable is actually not a real executable.

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

-seanb

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?

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

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.