Lỗi source file not compiled trong dev-c năm 2024

  1. Lỗi source file not compiled trong dev-c năm 2024
    lỗi dev c++
    mình dow dev c++ trên trang bloodshed.net

    xong về cài viết đoạn chương trình rất đơn giản, chạy được trên borland c vậy mà dev nó báo lỗi : "source file not compile" pó tay !

    -
  2. > vì dev c++ có một số khai báo khác với bc nên bạn không thể compile. xem trong manual của nó thử xem. -
  3. >
    Lỗi source file not compiled trong dev-c năm 2024
    Được gửi bởi erjo

mình dow dev c++ trên trang bloodshed.net xong về cài viết đoạn chương trình rất đơn giản, chạy được trên borland c vậy mà dev nó báo lỗi : "source file not compile" pó tay !

đoạn code của bạn có phải là code ANSI C ko?

-
  1. >
    Lỗi source file not compiled trong dev-c năm 2024
    Được gửi bởi erjo

mình dow dev c++ trên trang bloodshed.net xong về cài viết đoạn chương trình rất đơn giản, chạy được trên borland c vậy mà dev nó báo lỗi : "source file not compile" pó tay !

khi viết trên dev C bạn chú ý là khi viets hàm main phải viết dạng: int main(){ //do something return 0; } ko dc viết : void main(){

}

-

If you're someone like me that rarely reads instructions when installing an application then you might definitely meet with the problem I got today and I want to tell you, this might come in handy 👍 .

Initially, I've been a DevC++ application fan and if I was doing anything C i.e the CS50 courses, I would definitely use DevC++ for my C programs. But today I got the error of Source file not compiled for the very first time, got all sweaty, and thanks to StackOverflow, I managed to get a solution which was installing CodeBlocks.

I just went right on to CodeBlocks, got the 1st .exe file I could find & installed(clicked Next, Next, finish) without reading through.

I open my C program files and on running:-

Source file not compiling dialog box
  1. I came across a guide to installing and configuring CodeBlocks and I figured I really didn't install the setup right.
    Win + R, type control, uninstall CodeBlocks, Restarted my PC and now I was ready to follow the instructions in the above link but still, I didn't reach the part that Enables me to have a "GNU GCC Compiler".

I did the above step for over 4 times but still i got the same error 😞 .

Now I started playing with every option in the toolbar till I found a solution 👏 .

👉 This will only work if you have set your Environment variables like in the link in step 1 or can use these simple steps below:-

  • Win + E, file explore opens up
  • Go to This PC
  • Right-click This PC, click on properties
  • On your left, click Advanced system settings
  • click on Environment Variables
  • Under System variables, click Path then Edit...
  • Browse for the C:\Program Files\CodeBlocks\MinGW\bin according to which drive you installed the application.

Now that your Environment variables are set, open your CodeBlocks application to setup my "GNU GCC Compiler" as shown below:-

I am really new to C++ so I can learn to make programs, games, etc. I tried to practice with a code in Dev-C++ and tried to run it. It gives me "Source File not compiled". I don't know if I'm doing this wrong in general since I tried to edit it in Notepad++ and it gives me an error as well, saying "The program or feature "filename" cannot start or run due to incompatibity with 64-bit windows". I don't understand it though, am I supposed to use a different code instead of ?.This is my short code: