---
title: "gcc 执行c++报错"
author: "dotjar"
date: "2012-07-09T10:26:27Z"
tags: []
categories: ["编程语言"]
slug: "gcc-c"
draft: false
lastmod: "2012-07-09T10:26:27Z"
id: 1582308
url: "https://niewj.iteye.com/blog/1582308"
---

```
D:\cpp>g++ hello.cc
Info: resolving std::cout  by linking to __imp___ZSt4cout (auto-import)
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without
 --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
```

 gcc下执行时报此错 加参：

 

 

```
g++ -enable-auto-import hello.cc 
```