Cook the onions in the olive oil on low to medium heat stirring frequently. It should take about 30 minutes to get a good caramelization effect. Add the minced garlic and cook for one minute. Add the flour and cook for another minute. Now add the beef stock and wine and simmer for another 30 minutes. Season to taste with salt and pepper.
To serve, ladle the soup into oven-proof bowls (or use a single large oven proof dish), making sure that everyone gets plenty of onions. Place cubes of French bread to cover and than sprinkle with cheese. Bake in 350° F oven for 10 minutes, broiling for the last few minutes to brown slightly.