User forums > Using Code::Blocks
first use of make
MoonKid:
I try to work on a project called mahogany. For that I have build "imap" first. I try this, too.
For that I use a custom makefile.
--- Code: ---# ========================================================================
# Copyright 1988-2006 University of Washington
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# ========================================================================
# Program: IMAP Toolkit Makefile for Windows 9x and Windows NT
#
# Author: Mark Crispin
# Networks and Distributed Computing
# Computing & Communications
# University of Washington
# Administration Building, AG-44
# Seattle, WA 98195
# Internet: MRC@CAC.Washington.EDU
#
# Date: 7 December 1989
# Last Edited: 30 August 2006
COPY=copy
CD=cd
MAKE=nmake /nologo /f makefile.nt
MKDIR=mkdir
RD=rmdir /s /q
# Make the IMAP Toolkit
build: c-client mtest mailutil imapd ipopd
$(CD) c-client
$(MAKE)
$(CD) ..\mtest
$(MAKE)
$(CD) ..\mailutil
$(MAKE)
$(CD) ..\ipopd
$(MAKE)
$(CD) ..\imapd
$(MAKE)
$(CD) ..
c-client:
$(MKDIR) c-client
$(COPY) src\c-client\*.* c-client
$(COPY) src\charset\*.* c-client
$(COPY) src\osdep\nt\*.* c-client
mtest:
$(MKDIR) mtest
$(COPY) src\mtest\*.* mtest
mailutil:
$(MKDIR) mailutil
$(COPY) src\mailutil\*.* mailutil
ipopd:
$(MKDIR) ipopd
$(COPY) src\ipopd\*.* ipopd
imapd:
$(MKDIR) imapd
$(COPY) src\imapd\*.* imapd
clean:
$(RD) c-client mtest mailutil ipopd imapd
# A monument to a hack of long ago and far away...
love:
@echo 'not war?'
--- End code ---
Something is done and the build-log close as you can see here.
--- Code: ---cd c-client
nmake /nologo /f makefile.nt
cd c-client
nmake /nologo /f makefile.nt
cl -c /MT /W3 /Ox /DCHUNKSIZE=65536 /DWIN32 /D_WIN32_WINNT=0x0400 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -nologo /I.. os_nt.c
os_nt.c
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 's'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2061: Syntaxfehler : Bezeichner 's'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(69) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(73) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2061: Syntaxfehler : Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(89) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(96) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2061: Syntaxfehler : Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(101) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(109) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2061: Syntaxfehler : Bezeichner 'hSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(131) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(138) : error C2059: Syntaxfehler : ')'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2061: Syntaxfehler : Bezeichner 'sListenSocket'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2059: Syntaxfehler : ';'
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(146) : error C2059: Syntaxfehler : ','
C:\Programme\Microsoft Visual Studio\VC98\include\mswsock.h(154) : error C2059: Syntaxfehler : ')'
ssl_nt.c(31) : fatal error C1083: Include-Datei kann nicht geoeffnet werden: 'schannel.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : Rueckgabe-Code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio\VC98\bin\nmake.exe"' : Rueckgabe-Code '0x2'
Stop.
make.exe: *** [build] Error 2
Process terminated with status 2 (0 minutes, 2 seconds)
0 errors, 0 warnings
--- End code ---
In the build-settings I can see the make-command that Code::Blocks use. But if I insert "make" in my WinXP-shell it is an unknown command. Does C::B use the MinGW make automaticly? Ok, but what is about this VC98 thing in the build log. I have MSVC6-IDE on my system, but I do not want to use it.
The result of this build are some o-files but no lib-file is created.
It is the first time I use a makefile.
Deschamps:
--- Quote ---(..) In the build-settings I can see the make-command that Code::Blocks use (..) I have MSVC6-IDE on my system, but I do not want to use it
--- End quote ---
I suppose that this "make" command you have commented is only the variable used by C::B referring the make command defined in Settings -> Compiler and debugger -> Global compiler settings -> Toolchain executables.
But, if you have MSVC6 installed in your system, then it's tools will be probably included in your path. The makefile you are trying to use is calling to nmake, and your system is finding nmake inside that path: C:\Programme\Microsoft Visual Studio\VC98\bin\nmake.exe.
So, I think that you have only a configuration problem. BTW, what compiler are you trying to use?
MoonKid:
--- Quote from: Deschamps on June 02, 2007, 07:48:48 pm ---I suppose that this "make" command you have commented is only the variable used by C::B referring the make command defined in Settings -> Compiler and debugger -> Global compiler settings -> Toolchain executables.
--- End quote ---
Ok, I just find make.exe (I think it is in CodeBlocks/bin) in this settings. I found nothing about MSVC there or in other compiler settings or search-dirs, etc.
--- Quote from: Deschamps on June 02, 2007, 07:48:48 pm ---But, if you have MSVC6 installed in your system, then it's tools will be probably included in your path. The makefile you are trying to use is calling to nmake, and your system is finding nmake inside that path: C:\Programme\Microsoft Visual Studio\VC98\bin\nmake.exe.
--- End quote ---
Ok, I uninstalled my MSVC. Now the shell didn't find any nmake. In CodeBlocks/bin is no nmake.exe.
--- Quote from: Deschamps on June 02, 2007, 07:48:48 pm ---So, I think that you have only a configuration problem. BTW, what compiler are you trying to use?
--- End quote ---
C::B is setup to GNU GCC. So it is the MinGW compiler suite in CodeBlocks/bin.
Deschamps:
--- Quote from: MoonKid ---(..) C::B is setup to GNU GCC. So it is the MinGW compiler suite in CodeBlocks/bin (..)
--- End quote ---
I'm a little confused here. C::B doesn't include any compiler itself, I think that has defined a GCC option by default, tough. In any case, you need to install one of the supported compilers for build your programs with Code::Blocks.
MoonKid:
--- Quote from: Deschamps on June 02, 2007, 08:11:42 pm ---In any case, you need to install one of the supported compilers for build your programs with Code::Blocks.
--- End quote ---
The mingw32-g++.exe, make.exe, etc files are all in CodeBlocks/bin. I do not know why they are there. Maybe MinGW install it there automaticly if it finds C::B. Or C::B copied it automaticly there if it findes MinGW on the system.
I didn't know that.
But it work.
Navigation
[0] Message Index
[#] Next page
Go to full version