If you're not using a hub then you need to connect them with crossover cable as you said.
But you have to remember 2 rules:
1- the cable length can't exceed 3 meters.
2- You can use only 4 wires (Pins 1 and 2 to transmit) and (Pins 3 and 6 to receive).
You should connect them as follow:
Remember to hold the RJ45 connector with the 'clip' on the bottom, and pin 1 is the one on the left.
(PS: If you use a hub, things become really easier).
Once connected, just give each computer a different IP address, but the same workgroup name. Then try to ping and it will work.