You don't say how long this has been going on or if there was any change in your diet just before it started??
My daughter used to have alot of constipation, but ate everything (except bananas) & I mean everything. Then she went to italy for 31/2 months & came back with irritable bowel syndrome (alot of her symptoms were what you describe) due to her body just not being able to cope with the massive amounts of carbohydrates etc there, she lost alot of weight (went down to about 70lbs) then after she self-diagnosed (drs being total morons & refusing to listen, hear or consider any alternative to anorexia nervosa!! Girl teen weight loss = automatically anorexia nervosa (& they were specialists!!) she cut out potatoes, sweet potatoes, corn, rice, pasta, bread, cakes, etc & sugars etc & gained weight, now has normal pain free bowel movements & no cramping (except if she eats the wrong food by accident) - there's also tonnes of great recipes for sweet stuff (cheesecakes, biscuits, muffins etc etc that she's now found that use alternatives like splenda & almond flour so that she can eat the yummy stuff!!).