Advertisement
JPeterson

x86_64-w64-mingw32-ld cannot find -lkernel32

Sep 21st, 2012
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.50 KB | None | 0 0
  1. # x86_64-w64-mingw32 x86_64-linux
  2. f=mingw-w64-bin_x86_64-linux_20120920.tar.bz2; wget -N http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/$f && sudo tar xvjf $f --exclude .root.init.marker --exclude mingw --exclude=*.la -C /usr/local
  3.  
  4. # compile glew
  5. wget -N http://heanet.dl.sourceforge.net/sourceforge/glew/glew/1.7.0/glew-1.7.0.tgz && rm -rf glew-1.7.0; tar xzf glew-1.7.0.tgz && cd glew-1.7.0
  6.  
  7. x86_64-w64-mingw32-gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -DSTATIC -o src/glew.o -c src/glew.c
  8. x86_64-w64-mingw32-ld -o lib/glew32.dll src/glew.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
  9. ...
  10. x86_64-w64-mingw32-ld: cannot find -lkernel32
  11.  
  12. x86_64-w64-mingw32-ld --verbose|grep SEARCH_DIR
  13. SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
  14.  
  15. x86_64-w64-mingw32-ld -o lib/glew32.dll src/glew.o -L../lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
  16. ...
  17. x86_64-w64-mingw32-ld: cannot find -lkernel32
  18.  
  19. export LIBRARY_PATH=/usr/local/x86_64-w64-mingw32/lib
  20. export LD_LIBRARY_PATH=/usr/local/x86_64-w64-mingw32/lib
  21. echo $LIBRARY_PATH $LD_LIBRARY_PATH
  22. /usr/local/x86_64-w64-mingw32/lib /usr/local/x86_64-w64-mingw32/lib
  23.  
  24. x86_64-w64-mingw32-ld -o lib/glew32.dll src/glew.o -L../lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
  25. ...
  26. x86_64-w64-mingw32-ld: cannot find -lkernel32
  27.  
  28. x86_64-w64-mingw32-ld -o lib/glew32.dll src/glew.o -L/usr/local/x86_64-w64-mingw32/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement