Advertisement Jump to content


This topic is now archived and is closed to further replies.

c t o a n

Mixing MFC with Engine Library

This topic is 5399 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m currently working on developing several tools for my graphics engine (named Spex) in C++. I build staticly linked libraries for my engine, and these have been successfully linked with other projects. Now, I switch to MFC to build these tools, and I can''t link to my libraries. The error I get is "Spex Engine.exe could not be found. Re-installing may fix the problem" but I''m not even referencing Spex Engine.exe anywhere in my app. I''ve linked to the library using the #pragma comment(lib,...) syntax, and have included my engine headers correctly. If I leave out the #pragma line, the linker will complain about unresolved symbols, so I know it''s finding the library and it''s linking correctly. After clicking OK to the "Spex Engine.exe could not..." message, I get another one that says "DLL Could Not Be Found". Does anybody know what''s causing this? I don''t know why my library would be referencing Spex Engine.exe, but what should I do? Any help is greatly appreciated! I''m using Windows XP, Microsoft VC++ 6.0 Enterprise Edition, and I''m trying to get it to work with MFC. Chris Pergrossi My Realm | "Good Morning, Dave"

Share this post

Link to post
Share on other sites
You''ll probably need to add a couple of build configurtions to your static libs, I call them "MFC Debug" & "MFC Release". They are almost the same as the Win32 equivalents, except in the build options you need to change (in the Project Settings dialog):

"General->Microsoft Foundation Classes: Use MFC in a shared DLL"
"C/C++->Catagory:Code Generation->Use runtime library:Debug Multithreaded DLL" (for the Debug build, "Multithreaded DLL" for Release).

You can copy your existing "Win32 Debug" and "Win32 Release" configs, rename them and change these two options (I think they''re the only two..)

- Matt

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!