[solved] Windows Error 87 : Parameter incorrect

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

klaus
Just popping in
Just popping in
Posts: 4
Joined: Thu Jun 26, 2008 14:23
Contact:

[solved] Windows Error 87 : Parameter incorrect

Postby klaus » Fri Nov 04, 2011 20:21

Hi all,

The weirdest thing happened in my life! I use CEGUI in a dll plugin for another project. After I upgraded my visual studio from 2008 to 2010, I can't run my project! just when I load the plugin dll with LoadLibrary, error 87 pops up and tells me: The parameter is incorrect. I have googled the web for about a week, yet I have not found a working solution for it.
The error rises exactly in the OpenLibrary function, which is completely for windows, and I don't pass any parameter to the function. (The function takes only the address for the module to be loaded, nothing extra)

Can anyone help me with this?
Last edited by klaus on Sun Nov 06, 2011 09:56, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Windows Error 87 : Parameter incorrect

Postby CrazyEddie » Sat Nov 05, 2011 18:02

Did you rebuild everything with the new compiler? And made sure that any prebuilt components are also using the same compiler?

I don't really know if the above would work, since I have no details about what you're doing. I don't develop on windows these days, but know that it's real finicky about everything matching up as regards to compilers and such.

CE.

klaus
Just popping in
Just popping in
Posts: 4
Joined: Thu Jun 26, 2008 14:23
Contact:

Re: Windows Error 87 : Parameter incorrect

Postby klaus » Sat Nov 05, 2011 18:52

Hi CE!

I deleted EVERYTHING, checked the project out from SVN and rebuild it. I work on Windows 7 with VS2010 (without SP1) and I'm using CEGUI 0.7.5 SDK originally from this website. The closest solution I have found to my problem is that one or more of these components use different versions of VC runtime: My project, the DLL plugin, CEGUI. Since there is no difference in compiler flags for the project and the plugin, can I ask you what C runtime version are you compiling the windows SDK with?

Thanks in advance :)

klaus
Just popping in
Just popping in
Posts: 4
Joined: Thu Jun 26, 2008 14:23
Contact:

Re: Windows Error 87 : Parameter incorrect

Postby klaus » Sun Nov 06, 2011 09:54

Finally... I found the reason. I don't excatly know why, but it is definitely related to this option:
In the linker section of the DLL configuration there is an option, named "Link time code generation"
If this option is not set to: Yes (which adds the parameter "/LTCG" to the linker parameters) the problem will arise.
The problem is not related to CEGUI of even standard C++. It is a visual studio specific problem.

Thanks again :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [solved] Windows Error 87 : Parameter incorrect

Postby CrazyEddie » Sun Nov 06, 2011 16:44

I don't think I've ever heard of that. Thanks for posting the resolution to the issue.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest