Here is how I made a rack for a roof gutter on a trooper. I would do exactly the same if I made one for my truck cab.
You must be registered for see images attach
It is very simple. Two pieces of flat stock, and one L shaped bolt.
The crossbar is a piece of unistrut.
Cut one rectangular piece out of the flat stock. Cut a notch in the top to accept the unistrut laying in it.
Cut the other piece of flat stock in a flattened triangle.
The flat at the top, has to be wider than the unistrut.
Fold the bottom of that piece so it is shaped like an L.
I made the L shaped bolt by buying some u-bolts that were big enough. Then cutting them so I had two L shaped bolts.
Weld the L bolt to the L-shaped flat stock.
Now you can merely sit the bigger piece in the gutter.
Lay the unistrut in the notch.
Insert the top of the bolt through the unistrut. Put on a nut. And tighten until the "L" is pulled up underneath the gutter. (I put a piece of rubber hose over the top of the bolt, where it reached higher than the sides of the unistrut. This keeps people from cutting themselves on the threads when they are messing around tieing things down.)
You will notice there is a gap between the two pieces of flat stock, where they both meet the unistrut. This is intentional. It puts some racking strength into the connection, so the unistrut doesn't just flop from one side of the truck to the other, and loosen up.
Bonus to using unistrut is that they have all kinds of cool gadgets to connect things to the unistrut with. And even if you don't use the gadgets, the unistrut is incredibly strong, and has holes all along it's length that you can tie or hook through.