ganluo
ganluo

Reputation: 25

as.exe - entry point not found the procedure entry point __printf__ could not be located in the dynamic link library

Yt works early.when I try to use gcc commend it show me. I already uninstalled and re-installed gcc 4.8.

this is error:

as.exe - entry point not found
the procedure entry point __printf__ could not be located in the dynamic link library c:\mingw\bin..\lib\gcc\mingw32\4.8.1\..\..\..\..\mingw32\bin\as.exe"

this is code:

#include <stdio.h>

int main(){

}

Upvotes: 2

Views: 12497

Answers (4)

Tailwhip
Tailwhip

Reputation: 29

I just added a path to the as.exe to the system environment variables and it worked. In my case it was path to the Code blocks gcc compiler on Windows 10: C:\Program Files (x86)\CodeBlocks\MinGW\bin

Upvotes: 0

Antony Thomas
Antony Thomas

Reputation: 3686

Sometimes as.exe can also be sourced from c:\MinGW\msys\1.0\bin\ which might conflict with c:\MinGW\bin\. I suggest to experiment as @DavidMacek did - remove c:\MinGW\bin from PATH and reboot the shell and then type as --help to see if things are fine.

If things are fine. Goto your environmental variable and "move up" c:\MinGW\msys\1.0\bin\ above c:\MinGW\bin\ to let msys take precedence.

Upvotes: 1

ComEngineer
ComEngineer

Reputation: 151

I know it's too late to answer, but maybe it can help someone else.

I have just faced this problem, it is solved that change the directory name (in MinGW directory) from mingw32 to mingw32old. Because these two directory has as.exe in their bin directory, so they conflicts, and occures error. However, now it is working,

hope benefits to your problems.

Upvotes: 13

David Macek
David Macek

Reputation: 917

(I'd rather post this as a comment, but I don't have enough reputation yet.)

The error seems to be related to the start of as, not to your code. You can check by running as --help (it should display a long list of options). Assuming this command also fails, continue with reading.

The whole error looks a bit weird, but I guess your issue is caused by multiple conflicting DLLs in your PATH. You should be able to test this hypothesis by going into c:\mingw\bin, clearing PATH completely (set PATH= in the Windows shell; export PATH= in Bash) and trying to execute as --help again. If that helped, you need to identify what program in your PATH is causing this and either remove it from PATH completely, or remember to set a custom, short, non-conflicting PATH everytime you want to use your mingw installation.

Upvotes: 3

Related Questions