There were guns mounted on some of the landing craft, the problem is, they were firing from what would be a far from fixed position, uphill, under fire from far superior firepower. The Germans were dug in, and shooting downhill (there is a reason for getting the high ground) with superior (direct) firepower on their side.
The battleships, cruisers, destroyers, ect did bombard the landing sites during and right before the assaults. However, due to the secrecy of the attack, bombing the beaches before hand would have given away the landing locations (and while clearing up what was at the beaches then, it would have alerted the enemy to send reinforcements and even more Allied soldiers would have been killed). And the German defenses were insane. Built to withstand any bombardment. Many of the landing craft landed in the wrong place, right into the teeth of positions they were trying to avoid.
A baffling mystery of the D-Day landings was solved by an amateur historian - after he found a crumpled map at a fair in Stockport.
Experts have long disputed the location of the main Nazi gun battery which caused carnage on Omaha Beach, in terrible scenes which were recreated for the Hollywood film Saving Private Ryan.
The Germans had built a decoy gun emplacement overlooking the area while the location of the real guns which blasted the beach, where 2,000 men lost their lives, remained unclear.
More here--
http://www.freerepublic.com/focus/f-news/1948337/postsInformation on Omaha Beach from
WikipediaBound at either end by rocky cliffs, the Omaha Beach crescent presented a gently sloping tidal area averaging 300 yards (275 m) between low and highwater marks. Above the tide line was a bank of shingle 8 feet (2.4 m) high and up to 15 yards (14 m) wide in some places. At the western end the shingle bank rested against a stone (further east becoming wood) constructed sea wall which ranged from 4–12 feet (1.5–4 m) in height. For the remaining two thirds of the beach after the seawall ended the shingle lay against a low sand embankment. Behind the sand embankment and sea wall lay a level shelf of sand, narrow at either end and extending up to 200 yards (180 m) inland in the center. Steep escarpments or bluffs then rose 100–170 feet (30–50 m), dominating the whole beach and cut into by small wooded valleys or draws at five points along the beach, codenamed west to east D-1, D-3, E-1, E-3 and F-1.[1]
The German defensive preparations and the lack of any defense in depth indicated that their plan was to stop the invasion at the beaches.[2] Four lines of obstacles were constructed in the water. The first, a non-contiguous line with a small gap in the middle of Dog White sector and a larger gap across the whole of Easy Red sector, was 270 yards (250 m) out from the highwater line and consisted of 200 Belgian Gates with mines lashed to the uprights. Some 32 yards (30 m) behind these was a continuous line of logs driven into the sand pointing seaward, every third one capped with an anti-tank mine. Another 32 yards (30 m) shoreward of this line was a continuous line of 450 ramps sloping towards the shore, also with mines attached and designed to force flat-bottomed landing craft to ride up and either flip or detonate the mine. The final line of obstacles was a continuous line of hedgehogs 165 yards (150 m) from the shoreline.[3] The area between the shingle bank and the bluffs was both wired and mined, and mines were also scattered on the bluff slopes.
"The tree of liberty must be refreshed from time to time with the blood of patriots and tyrants." -Thomas Jefferson
"A man-of-war is the best ambassador" -Oliver Cromwell