Craft icon indicating copy to clipboard operation
Craft copied to clipboard

mingw32-make Error.

Open 09jlardinois opened this issue 7 years ago • 6 comments

I've got C:\Program Files\CURL setup with \lib \bin \include and .\ from that directory in the PATH variables. Just hasn't been working. I truly don't know what I'm doing because I've never used C or cMake. Just looking for the updated glfw build. Can't seem to build.

I keep getting this error even after multiple restarts and bypassing permissions by plopping it in other folders.

[ 14%] Built target glfw [ 15%] Linking C executable craft.exe CMakeFiles\craft.dir/objects.a(auth.c.obj):auth.c:(.text+0xae): undefined reference to _imp__curl_easy_init' CMakeFiles\craft.dir/objects.a(auth.c.obj):auth.c:(.text+0x11a): undefined reference to _imp__curl_easy_setopt' CMakeFiles\craft.dir/objects.a(auth.c.obj):auth.c:(.text+0x189): undefined reference to _imp__curl_easy_perform' CMakeFiles\craft.dir/objects.a(auth.c.obj):auth.c:(.text+0x1a4): undefined reference to _imp__curl_easy_getinfo' CMakeFiles\craft.dir/objects.a(auth.c.obj):auth.c:(.text+0x1ad): undefined reference to _imp__curl_easy_cleanup' CMakeFiles\craft.dir/objects.a(main.c.obj):main.c:(.text.startup+0x2a): undefined reference to _imp__curl_global_init' CMakeFiles\craft.dir/objects.a(main.c.obj):main.c:(.text.startup+0x1975): undefined reference to _imp__curl_global_cleanup' collect2.exe: error: ld returned 1 exit status CMakeFiles\craft.dir\build.make:343: recipe for target 'craft.exe' failed mingw32-make[2]: *** [craft.exe] Error 1 CMakeFiles\Makefile2:71: recipe for target 'CMakeFiles/craft.dir/all' failed mingw32-make[1]: *** [CMakeFiles/craft.dir/all] Error 2 Makefile:128: recipe for target 'all' failed mingw32-make: *** [all] Error 2`

09jlardinois avatar Oct 17 '18 20:10 09jlardinois

Something to do with Norton Antivirus. I fixed that part, but now I get this error.

[ 14%] Built target glfw mingw32-make[2]: *** No rule to make target 'C:/Program Files/CURL/lib/libcurl.dll.a', needed by 'craft.exe'. Stop. CMakeFiles\Makefile2:71: recipe for target 'CMakeFiles/craft.dir/all' failed mingw32-make[1]: *** [CMakeFiles/craft.dir/all] Error 2 Makefile:128: recipe for target 'all' failed mingw32-make: *** [all] Error 2

It can't find libcurl.dll.a even though it's clearly in the right path.

09jlardinois avatar Oct 17 '18 21:10 09jlardinois

Restarted from scratch. I get this:

CMakeFiles\craft.dir\objects.a(auth.c.obj):auth.c:(.text+0xae): undefined reference to `_imp__curl_easy_init' CMakeFiles\craft.dir\objects.a(auth.c.obj):auth.c:(.text+0x11a): undefined reference to `_imp__curl_easy_setopt' CMakeFiles\craft.dir\objects.a(auth.c.obj):auth.c:(.text+0x189): undefined reference to `_imp__curl_easy_perform' CMakeFiles\craft.dir\objects.a(auth.c.obj):auth.c:(.text+0x1a4): undefined reference to `_imp__curl_easy_getinfo' CMakeFiles\craft.dir\objects.a(auth.c.obj):auth.c:(.text+0x1ad): undefined reference to `_imp__curl_easy_cleanup' CMakeFiles\craft.dir\objects.a(main.c.obj):main.c:(.text.startup+0x2a): undefined reference to `_imp__curl_global_init' CMakeFiles\craft.dir\objects.a(main.c.obj):main.c:(.text.startup+0x1975): undefined reference to `_imp__curl_global_cleanup' collect2.exe: error: ld returned 1 exit status CMakeFiles\craft.dir\build.make:343: recipe for target 'craft.exe' failed mingw32-make[2]: *** [craft.exe] Error 1 CMakeFiles\Makefile2:71: recipe for target 'CMakeFiles/craft.dir/all' failed mingw32-make[1]: *** [CMakeFiles/craft.dir/all] Error 2 Makefile:128: recipe for target 'all' failed mingw32-make: *** [all] Error 2

09jlardinois avatar Oct 18 '18 01:10 09jlardinois

It has something to do with the curl libraries on Windows. As the error says, it cannot find references to _imp_curl_easy_init.

I'm getting the same issue.

The documentation on how to setup and build on Windows needs to get improved (specially the part about installing curl).

sharabiania avatar Oct 30 '18 15:10 sharabiania

It has something to do with the curl libraries on Windows. As the error says, it cannot find references to _imp_curl_easy_init.

Just wanted to let you know, I got it working. I kind of suspected maybe it was looking for a 32-bit CURL library even though I'm on 64-bit, so what I did instead of put the CURL/ folder containing lib and include folders into both /Program files and /Program Files (x86).

It built successfully and runs successfully without error, and includes the latest GLFW with the wandering / rising cursor fix.

09jlardinois avatar Nov 30 '18 19:11 09jlardinois

i did what 09jilardinois in code blocks, i used the 32 bit libraries and stuff and it worked!

RaspberryEqualsPi avatar Mar 03 '20 15:03 RaspberryEqualsPi

@09jlardinois can you close this issue, then?

ignacionr avatar Apr 11 '20 03:04 ignacionr