Lynton Grice
Lynton Grice

Reputation: 1445

Undefined symbol: .main

We have installed GCC and libgcc on AIX.

I am busy compiling a C library on the machine and keep getting the following error:

Undefined symbol: .main

Any idea how to solve this?

Thanks for the help

Lynton

Upvotes: 0

Views: 10228

Answers (1)

ThiefMaster
ThiefMaster

Reputation: 318808

You are most likely using the wrong gcc arguments - probably you are using the same ones you'd use for an executable program (where main() is required). The correct arguments depend on what kind of library you want to build (a static one or a dynamic (.so) one)

Upvotes: 1

Related Questions