0

I'm following this tutorial for build libxml2 on windows. With a lot of effort I run ./configure and make files. But after make, the libxml2.a file is not created in ./libs folder. I have no idea how to fix this.

halfer
  • 19,824
  • 17
  • 99
  • 186
Jack
  • 16,276
  • 55
  • 159
  • 284
  • Posted an answer, but realized it was probably what you already did. What version of windows are you running? Also, from [this](http://sources.redhat.com/ml/insight-prs/2006-q4/msg00003.html) it looks like it might be a bintools issue – Jarrett Jun 17 '12 at 04:00
  • I'm using windows 7. And the link pointed in this thread is broken. – Jack Jun 17 '12 at 04:08
  • if I get this library compiled in anthoer computer using windows, it will work? – Jack Jun 17 '12 at 04:10
  • this link is broken?: http://sources.redhat.com/ml/insight-prs/2006-q4/msg00003.html I can get to it... Also, since it is statically linked, I think as long as you compile it on a win2k version of windows (windows 2000, xp, vista, 7) that is of the same architecture (i.e. 32bit/64bit) you should be okay. – Jarrett Jun 17 '12 at 04:21
  • Also, MinGW version 3.1 is super old, as is that tutorial page (from January 2004). You should probably find a better tutorial for compiling libxml, or consider getting pre-built binaries (i.e. pre-built libraries for win32 [here](http://xmlsoft.org/sources/win32/). – Jarrett Jun 17 '12 at 04:37
  • Actually, I'm not using same gcc of this tutorial. I'm using 4.4.1. And about pre-built libraries: I'm trying using it now. How do I install? I unzipped and copied `libxml` to `C:\Program Files\CodeBlocks\MinGW\include` and `libxml2_a` and `libxml2` to `C:\Program Files\CodeBlocks\MinGW\lib` but when I try to compile using `gcc -o file.c -lxml2 lWs2_32` I get `cannot find -xml2` – Jack Jun 17 '12 at 04:58
  • hmmm...you might want to check out [How to add a library path](http://www.mingw.org/wiki/LibraryPathHOWTO) for MinGW. I would try to explicitly specify the path to the library (i.e. `gcc -o file.c -L'C:\Program Files\CodeBlocks\MinGW\lib' -lxml2 -lWs2_32`). Also, don't forget the - in front of the 'lWs2_32' (it was omitted in your comment). – Jarrett Jun 17 '12 at 13:52
  • Also, MinGW warns against using spaces in the absolute pathname for MinGW: _MinGW may have problems with paths containing spaces, and if not, usually other programs used with MinGW will experience problems with such paths. Thus, we strongly recommend that you do not install MinGW in any location with spaces in the path name reference; i.e. you should avoid installing into any subdirectory of "Program Files" or "My Documents", or the like._ – Jarrett Jun 17 '12 at 13:55
  • The links to Pastebin are now dead, so I have removed them. That means the question ought to be put on hold, since there is not enough information in the question for an [mcve]. – halfer May 06 '18 at 15:04

2 Answers2

1

you can follow [http://xmlsoft.org/FAQ.html]

you just execute ./configure make

if you want to create libxml2.a in /libs folder ,you need to execute

./configure
make
make install
Skyline
  • 53
  • 4
  • Thanks very much. The tutorial don't say about it. But how to run the `MSYS´ as admin or `root`(or something like this) if I click "run as administrator" on `MSYS`; I get `cannot find the rxvt.exe or sh.exe binary -- aborting`. – Jack Jun 17 '12 at 13:53
0

The solution:

instead of MYSY; I did it by using Cygwin quick & fast way.

Jack
  • 16,276
  • 55
  • 159
  • 284