I'm getting a strange warning that I don't understand and was hoping someone could explain it to me. Here is an example that illustrates this behavior.
Then I compile main.cpp and link it to the DLL produced above like this:
g++ -Wall -Wno-deprecated main.cpp -o main -L. -lfoo
The program compiles and runs as expected, but g++ gives me the following warning:
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\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.
My question/issue: What does this mean and how can I fix (not ignore) this warning? If I compile foo.cpp with main.cpp to produce main.exe, I don't get the warning. Meaning, if I do this, the warning is not there:
g++ -Wall -Wno-deprecated foo.cpp main.cpp -o main
That's besides the point, because I need to link to a DLL in the larger scope of my application. Any ideas?