You might need to pollinate them unless you have lots of bees and other insects to do the pollinating for you. I grow lots of flowers amongst my veggies in the polytunnel to attract in the bees and it does work. Their favourite flower is comfrey, which pops up all over the place from where I have used it as a mulch. I tend to find that I need to pollinate early in the season when there are not many squash/pumpkin/courgette flowers but later on there is no problem. If you have several spare male flowers you can break them off, remove all the petals then tip the pollen directly into the female flowers.