When you declare a port in XC as follows:
out port Led = XS1_PORT_4F;
The XC compiler does three things:
1) It creates a global called Led which is initialized with the resource ID XS1_PORT_4F.
2) It emits a constructor that configures the port at runtime before the start of main.
3) It emits a destructor that turns the port off after the program exits.
If you don't declare the port in XC you will need to do the configuration step (step 2) yourself. In this case the only configuration neccessary is to turn the port on. You can do this with the following assembly:
asm("setc res[%0], 0x8"::"r"(XS1_PORT_4F));
The various values you can give to the setc instruction are described in the
XS1 Architecture manual