Here is my solution:I used to call ipopt in python,which resulted in ipopt.exe in the system's environment variable,.But that version is different from the one I currently compile in c++.So I delete the old one,and add the new to my system's environment variable.Bingo,that works!