Dev-C++ Can Compile but not Execute

Started by
6 comments, last by nanobyte 22 years, 8 months ago
I have downloaded and put all the includes and libs where they need to be and set the Dev-C++ compiler up right. I went to nexe''s site and donwloaded the ''open window'' example, and it worked perfectly! But, I closed the program and now all I can do is just compile my directx programs (they compile without errors), but the "Execute" button is grayed out. So, I made sure that all the compiler settings were right once more, and I still can''t execute them. Any suggestions would be greatly appreciated. Thanks, Chris Lynch
Advertisement
youve compiled it, but have you linked it? You''ll have to link/build it first, before you can run the program. Also, if youve done that, can you run the exe from outside of the compiler?

here in castle camelot we eat ham and jam and spam alot!
Thats the problem, it won''t link. I have only gotten it to link a few times. No matter which way I compile it (different menu options) it doesn''t link.
Yeah, I think I have the same problem, or maybe a bit different. I dont think they converted DX8 completly to the format required for Dev C++ becaue I''m getting all these reference errors. If I''m wrong then dont be mean...I''m a card carrying newbee
If I were you I wouldn''t bother messing around with .lib''s

Just dynamically link to the dll''s you need, it''s guaranteed to work from any compiler, and you can handle things any way you want if the dll isn''t there.

just include windows.h and use the LoadLibrary function, and GetProcAddress, full details are in the Win32API help file.
make sure your including the proper libraries.
here is an example showing how to link the libs to your app.

#pragma comment(lib, "d3d8.lib")
#pragma comment(lib, "d3dx8.lib")
#define WIN32_LEAN_AND_MEAN
#include
#include
Hi, I''m a dev-c++ user, I''ve got the dx8 SDK from www.openrpgs.com, (see the downloads/others section),
it works perfectely, I''m happy and i''m making some cool demos,
so I thinks you don''t have to worry, here the causes of your problems:

- Before compiling anything, you MUST create a project in dev-c++, and THEN add the *.cpp files you need to compile to your project.
for example, if you want to compile "teapot.cpp", you should have created a project with the "teapot.cpp" file inside.

- Then you open the project, you go to "Compiler options",
and specify -fvtable-thunks in your compiler options.

- Before compiling, you must go to "Project options", and
write, in the first text area: -ld3d8 -ld3dx8d. this tells
the compiler to link the program with the libd3d8 and libd3dx8d libraries. After doing that, you shouldn''t have any problems with the linker.

- Of course, all the include files from the SDK must be accessible, (put them in Dev-c++\include), and the lib files
also put them in Dev-c++\lib.

- Ok, it''s done, you can compile and execute from both the compiler and the executable, hehe..

- If you are a beginner, you MUST visit www.drunkenhyena.com,
there is all you need to start in dx8

good luck, and visit my site http://aminouch.tripod.com to see
some demos, or contact me (address in the site) if something goes wrong with Dev-c++
mine from morocco
Thanks everyone. It works perfectly now.

This topic is closed to new replies.

Advertisement