Need help to compile a open source C/C++ code under windows?

  • 主题发起人 主题发起人 ben4
  • 开始时间 开始时间

ben4

知名会员
注册
2002-06-18
消息
247
荣誉分数
2
声望点数
178
Any guru here can help me out? I am hitting the wall to compile a open source code. Basicailly this open source have several other open source libraries dependency and in order to compile this one I need to compile others as well. I am not good at this and want to get tips from here. I am trying to use VC++ 6.0 now.
 
Could you explain to me what is "BT hotdog" or who is "BT hotdog"? Thx
 
最初由 ben4 发布
Could you explain to me what is "BT hotdog" or who is "BT hotdog"? Thx
陪你去看龙卷风
 
well, why don't you do those things you just said?

complie other lib and try to complie the whole project

if you cant find any open source lib, you can definitely try google

and btw, whats the error output, without that who knows what the heck r u talking about?
 
最初由 shusheng 发布
Install cygwin.
What is the difference between cygwin and vc6 compiler? I mean is the exe or lib files runable under the win32 platform (sorry didn't check cygwin site yet, probably a stupid question) if I can get my stuff compiled under cygwin using the makefile for unix like ./configure
I can't compile even the one of the smallest dependent library like gnu regex 0.12.(ftp://ftp.gnu.org/pub/gnu/regex/) under win32 using nmake. Very frustrating!
 
When compile regex using makefile.vc under command line
nmake /f makefile.vc

got error msg
==============
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

for d in doc test; do (cd $d; NMAKE CPPFLAGS='-DHAVE_STRING_H -DREGEX_M
ALLOC' CFLAGS='-Ox -G6' CC='cl' DEFS='' LDFLAGS='' LOADLIBES='' default); done
d was unexpected at this time.
NMAKE : fatal error U1077: 'for' : return code '0x1'
Stop.

========= my makefile.vc=========
# Makefile for regex.
#
# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

version = 0.12

# You can define CPPFLAGS on the command line. Aside from system-specific
# flags, you can define:
# -DREGEX_MALLOC to use malloc/realloc/free instead of alloca.
# -DDEBUG to enable the compiled pattern disassembler and execution
# tracing; code runs substantially slower.
# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
# the corresponding C procedures). If not -DDEBUG, the macros
# are used.
CPPFLAGS = -DHAVE_STRING_H -DREGEX_MALLOC

# Likewise, you can override CFLAGS to optimize, use -Wall, etc.
CFLAGS = -Ox -G6

# Ditto for LDFLAGS and LOADLIBES.
LDFLAGS =
LOADLIBES =

#srcdir = @srcdir@
#VPATH = @srcdir@

CC = cl
#DEFS = @DEFS@

SHELL = /bin/sh

subdirs = doc test

default all:: regex.obj
.PHONY: default all

regex.obj: regex.c regex.h
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $*.c

clean mostlyclean::
rm -f *.obj

distclean:: clean
rm -f Makefile config.status

extraclean:: distclean
rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out

configure: configure.in
autoconf

config.status: configure
sh configure --no-create

Makefile: Makefile.in config.status
sh config.status

makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'

default all install \
mostlyclean clean distclean extraclean realclean \
TAGS check::
for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done
.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check

# Prevent GNU make 3 from overflowing arg limit on system V.
.NOEXPORT:

distfiles = AUTHORS ChangeLog COPYING INSTALL NEWS README \
*.in configure regex.c regex.h
distdir = myregex-$(version)
distargs = version=$(version) distdir=../$(distdir)/$$d
dist: TAGS configure
@echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
@echo " regex.c, regex.h,"
@echo " and doc/xregex.texi (if modified)."
rm -rf $(distdir)
mkdir $(distdir)
ln $(distfiles) $(distdir)
for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done
tar czhf $(distdir).tar.Z $(distdir)
rm -rf $(distdir)
.PHONY: dist
 
Did u ./configure it first?
 
最初由 shusheng 发布
Did u ./configure it first?
I was compiling it under window XP using nmake.
 
后退
顶部