Although the Danube and Rhine basins actually are separated by only a few miles (near Lake Constance), it would be daft to connect the two rivers by a canal at that point. Not only would the canal have to be cut through mountainous terrain, but the Danube simply is not navigable at that point. A better solution would have been the one eventually taken in the 1990s: a canal connecting the Danube with the Main river in the vicinity of Nürnberg.
There are, however, a number of good reasons why such a canal was only built in the 1990s rather than the 1890s or the 1770s, some of which have already been alluded to here.
The "golden age" of canal building was in the century after 1750: by 1850, the railroad proved to be both cheaper and more adaptable (it was, e.g., easier to build a railroad over a desert or a mountain range than it was to traverse that terrain with a canal). The British were at the forefront of canal building during this era, and a comparison between the British and German situations is useful in determining why there was no Rhine-Danube canal built in the eighteenth century.
1. Britain was politically united; Germany was politically divided.
There were no political frontiers to get in the way of a canal in Britain, whereas pre-unification Germany was nothing but frontiers. Even though the area of the current Europa canal would have been largely within the electorate/kingdom of Bavaria, it still would have run into political problems unknown in the British context (e.g. a barge going from Vienna to Cologne would have passed dozens of customs barriers, paying duties at every one).
2. Britain surpassed Germany in access to credit
Canals are ridiculously expensive, and there was very little in the way of government subsidies going to private companies. In order to build a canal, therefore, an entrepreneur needed money and lots of it. Britain had, in the eighteenth and nineteenth centuries, a fairly modern system of banking and finance, along with investors eager to support these types of speculative ventures. Germany, in contrast, was woefully lacking in all of these prerequisites.
3. Britain had a favorable legal structure; Germany did not
Closely connected to the financial system was the legal system: in order to finance a large project like a canal, it is necessary to pool the funds of a large number of investors. The only way to manage that kind of project is to form a partnership or, better yet, a limited liability company. Britain had some bad experiences with corporations in the early eighteenth century, but by the end of the century it had gradually shifted to a pro-corporation stance, which permitted these kinds of ventures to take advantage of a favorable legal climate. Germany, in contrast, was still largely hostile to limited liability corporate structures until the nineteenth century.
Those are just a few reasons. I haven't even taken into consideration the technological factors involved in canal-building at the time. For a good account of canal-building in the "first" industrial revolution, I recommend Phyllis Deane's
economic history of Britain during that period -- it's old but it's still quite good.