It would probably be illegal to do so without a license. The key fact in my mind is:
lets say I was starting up a gun company.
There are some exemptions from the requirement to obtain a license to manufacture guns, for example, for very low volume production of certain kinds of guns for personal use as a hobby in your own home. For example, if you want to make a black powder musket for personal use in your basement or garage, you are probably O.K. to refrain from obtaining a license.
But, if you are doing this through a gun company, with a purpose of ultimately making commercial sales of products based upon one of your prototypes to third parties, for profit, at any volume that would ultimately be high enough to be profitable, the kind of exemption that might exclude a single firearm manufactured in your basement as a hobby for personal use is not going to apply to your gun company.
In particular:
A Federal Firearms License (FFL) is a license in the United States
that enables an individual or a company to engage in a business
pertaining to the manufacture or importation of firearms and
ammunition, or the interstate and intrastate sale of firearms. Holding
an FFL to engage in certain such activities has been a legal
requirement within the United States since the enactment of the Gun
Control Act of 1968. The FFL is issued by the Bureau of Alcohol,
Tobacco, Firearms, and Explosives (BATFE, commonly known as the
"ATF").
The type of Federal Firearms License required would be a "Type 7" license, assuming that the pistol in question did not qualify as a "destructive device" and was not designed to have armor piercing ammunition. An additional Class 2 Special Occupational License would be required if it was an NFA (National Firearms Act) weapon such as a fully automatic machine pistol.
Additional fees and licenses would be required if you made ammunition for the pistol as well as the pistol itself.