title: AIX xlC cross-compilation/linkage for C++ not finding C symbols
body: <p>I am attempting to cross-compile on AIX with the xlc/xlC compilers.</p>
  
  <p>The code compiles successfully when it uses the default settings on another machine. The code actually successfully compiles with the cross-compilation, but the problem comes from the linker. This is the command which links the objects together:</p>
  
  <pre><code>$(CHILD_OS)/usr/vacpp/bin/xlC -q32 -qnolib -brtl -o $(EXECUTABLE) $(OBJECT_FILES)   
  -L$(CHILD_OS)/usr/lib  
  -L$(CHILD_OS)/usr/vacpp/lib/profiled  
  -L$(CHILD_OS)/usr/vacpp/lib  
  -L$(CHILD_OS)/usr/vac/lib  
  -L$(CHILD_OS)/usr/lib  
  -lc -lC -lnsl -lpthread  
  -F$(CHILD_OS)$(CUSTOM_CONFIG_FILE_LOCATION)
  </code></pre>
  
  <p>When I attempt to link the code, I get several Undefined symbols:
  .setsockopt(int,int,int,const void*,unsigned long), .socket(int,int,int), .connect(int,const sockaddr*,unsigned long), etc.</p>
  
  <p>I have discovered that the symbols missing are from the standard c library, libc.a. When I looked up the symbols with nm for the libc.a that is being picked up, the symbols do indeed exist. I am guessing that there might be a problem with the C++ being unable to read the C objects, but I am truly shooting in the dark.</p>