Warning: corrupt .drectve at end of def file
Asked Answered
W

4

15

I installed glew, glfw and glm in eclipse cdt(c++) with the gcc/mingw, all statically. All works fine, but I don't like the warning in the output console of eclipse:

Warning: corrupt .drectve at end of def file

How I can fix and hide this warning ? What does it mean ?

And what I noticed is, that this warning comes only, if I call the 'glewInit' function.

Wiggins answered 6/8, 2014 at 13:34 Comment(0)
I
11

When I ran into this problem it was because I was linking against incompatible MSVC libs. A comment by keltar helped me through this problem.

SDL 2.0: linking error

Intracutaneous answered 20/9, 2014 at 2:23 Comment(0)
R
9

The message

Warning: corrupt .drectve at end of def file

could also mean, that the project is being built with MinGW but the library it uses is created for Visual Studio.

MinGW and Visual Studio builds are not interchangeable.

Rebbecarebbecca answered 30/4, 2021 at 10:21 Comment(0)
W
1

I had this error in CLion for MinGW toolchain, but when I switched to VisualStudio toolchain, it disappeared.

Wiretap answered 13/6, 2021 at 20:14 Comment(0)
G
1

For me the reason this error came up was this:

I was building my project with mingw g++ BUT I was building the library with visual studio

different compilers use different .lib, .a, etc files

SO my solution:

  1. I generated glfw files with cmake for MSys2 Makefiles (I had make installed via msys2)
  2. Built that by going into the folder with the generated files and ran make
  3. Renamed "libglfw3.a" to "glfw3.lib" and moved it to my library directory

Then using the flag -L"{folder that glfw3.lib is in}" -lglfw3 in g++ it compiled just fine

Goldengoldenberg answered 13/12, 2023 at 18:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.