IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PostgreSQL Discussion :

[compilation libpq] débutant


Sujet :

PostgreSQL

  1. #1
    Membre régulier
    Inscrit en
    Avril 2008
    Messages
    89
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 89
    Points : 83
    Points
    83
    Par défaut [compilation libpq] débutant
    Bonjour,

    je cherche à compiler libpq.

    Je lance la commande suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    nmake /f win32.mak /d /p /a > Report_compil.txt
    Le win32.mak est le suivant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    # Makefile for Microsoft Visual C++ 7.1-8.0
     
    # Will build a static library libpq(d).lib
    #        and a dynamic library libpq(d).dll with import library libpq(d)dll.lib
    # USE_SSL=1 will compile with OpenSSL
    # USE_KFW=1 will compile with kfw(kerberos for Windows)
    # DEBUG=1 compiles with debugging symbols
    # ENABLE_THREAD_SAFETY=1 compiles with threading enabled
     
    ENABLE_THREAD_SAFETY=1
     
    # CPU="i386" or CPU environment of nmake.exe (AMD64 or IA64)
     
    !IF ("$(CPU)" == "")||("$(CPU)" == "i386")
    CPU=i386
    !MESSAGE Building the Win32 static library...
    !MESSAGE
    !ELSEIF ("$(CPU)" == "IA64")||("$(CPU)" == "AMD64")
    ADD_DEFINES=/D "WIN64" /Wp64 /GS
    ADD_SECLIB=bufferoverflowU.lib
    !MESSAGE Building the Win64 static library...
    !MESSAGE
    !ELSE
    !MESSAGE Please check a CPU=$(CPU) ?
    !MESSAGE CPU=i386 or AMD64 or IA64
    !ERROR Make aborted.
    !ENDIF
     
    !IFDEF DEBUG
    OPT=/Od /Zi /MDd
    LOPT=/DEBUG
    DEBUGDEF=/D _DEBUG
    OUTFILENAME=libpqd
    !ELSE
    FBM_LIBPQ_RAJOUT= -I "C:\Program Files\Microsoft Visual Studio\VC98\Include" -I "C:\Program Files\Microsoft Visual Studio 9.0\VC\include"
    OPT=/O2 /MD
    LOPT=
    DEBUGDEF=/D NDEBUG
    OUTFILENAME=libpq
    !ENDIF
     
    !IF "$(SSL_INC)" == "" 
    SSL_INC=C:\OpenSSL\include
    !MESSAGE Using default OpenSSL Include directory: $(SSL_INC)
    !ENDIF
     
    !IF "$(SSL_LIB_PATH)" == ""
    SSL_LIB_PATH=C:\OpenSSL\lib\VC
    !MESSAGE Using default OpenSSL Library directory: $(SSL_LIB_PATH)
    !ENDIF
     
    !IF "$(KFW_INC)" == "" 
    KFW_INC=C:\kfw-2.6.5\inc
    !MESSAGE Using default Kerberos Include directory: $(KFW_INC)
    !ENDIF
     
    !IF "$(KFW_LIB_PATH)" == ""
    KFW_LIB_PATH=C:\kfw-2.6.5\lib\$(CPU)
    !MESSAGE Using default Kerberos Library directory: $(KFW_LIB_PATH)
    !ENDIF
     
    !IF "$(OS)" == "Windows_NT"
    NULL=
    !ELSE 
    NULL=nul
    !ENDIF 
     
    CPP=cl.exe
    RSC=rc.exe
     
    !IFDEF DEBUG
    OUTDIR=.\Debug
    INTDIR=.\Debug
    CPP_OBJS=.\Debug/
    !ELSE
    OUTDIR=.\Release
    INTDIR=.\Release
    CPP_OBJS=.\Release/
    !ENDIF
     
     
    ALL : config "$(OUTDIR)\$(OUTFILENAME).lib" "$(OUTDIR)\$(OUTFILENAME).dll"
     
    CLEAN :
    	-@erase "$(INTDIR)\getaddrinfo.obj"
    	-@erase "$(INTDIR)\pgstrcasecmp.obj"
    	-@erase "$(INTDIR)\thread.obj"
    	-@erase "$(INTDIR)\inet_aton.obj"
    	-@erase "$(INTDIR)\crypt.obj"
    	-@erase "$(INTDIR)\noblock.obj"
    	-@erase "$(INTDIR)\md5.obj"
    	-@erase "$(INTDIR)\ip.obj"
    	-@erase "$(INTDIR)\fe-auth.obj"
    	-@erase "$(INTDIR)\fe-protocol2.obj"
    	-@erase "$(INTDIR)\fe-protocol3.obj"
    	-@erase "$(INTDIR)\fe-connect.obj"
    	-@erase "$(INTDIR)\fe-exec.obj"
    	-@erase "$(INTDIR)\fe-lobj.obj"
    	-@erase "$(INTDIR)\fe-misc.obj"
    	-@erase "$(INTDIR)\fe-print.obj"
    	-@erase "$(INTDIR)\fe-secure.obj"
    	-@erase "$(INTDIR)\pqexpbuffer.obj"
    	-@erase "$(INTDIR)\pqsignal.obj"
    	-@erase "$(OUTDIR)\win32.obj"
    	-@erase "$(INTDIR)\wchar.obj"
    	-@erase "$(INTDIR)\encnames.obj"
    	-@erase "$(INTDIR)\pthread-win32.obj"
    	-@erase "$(INTDIR)\snprintf.obj"
    	-@erase "$(INTDIR)\strlcpy.obj"
    	-@erase "$(OUTDIR)\$(OUTFILENAME).lib"
    	-@erase "$(OUTDIR)\$(OUTFILENAME)dll.lib"
    	-@erase "$(OUTDIR)\libpq.res"
    	-@erase "$(OUTDIR)\$(OUTFILENAME).dll"
    	-@erase "$(OUTDIR)\$(OUTFILENAME)dll.exp"
    	-@erase "$(OUTDIR)\$(OUTFILENAME).dll.manifest"
    	-@erase "$(OUTDIR)\*.idb"
    	-@erase pg_config_paths.h"
     
     
    LIB32=link.exe -lib
    LIB32_FLAGS=$(LOPT) /nologo /out:"$(OUTDIR)\$(OUTFILENAME).lib" 
    LIB32_OBJS= \
    	"$(INTDIR)\win32.obj" \
    	"$(INTDIR)\getaddrinfo.obj" \
    	"$(INTDIR)\pgstrcasecmp.obj" \
    	"$(INTDIR)\thread.obj" \
    	"$(INTDIR)\inet_aton.obj" \
    	"$(INTDIR)\crypt.obj" \
    	"$(INTDIR)\noblock.obj" \
    	"$(INTDIR)\md5.obj" \
    	"$(INTDIR)\ip.obj" \
    	"$(INTDIR)\fe-auth.obj" \
    	"$(INTDIR)\fe-protocol2.obj" \
    	"$(INTDIR)\fe-protocol3.obj" \
    	"$(INTDIR)\fe-connect.obj" \
    	"$(INTDIR)\fe-exec.obj" \
    	"$(INTDIR)\fe-lobj.obj" \
    	"$(INTDIR)\fe-misc.obj" \
    	"$(INTDIR)\fe-print.obj" \
    	"$(INTDIR)\fe-secure.obj" \
    	"$(INTDIR)\pqexpbuffer.obj" \
    	"$(INTDIR)\pqsignal.obj" \
    	"$(INTDIR)\wchar.obj" \
    	"$(INTDIR)\encnames.obj" \
    	"$(INTDIR)\snprintf.obj" \
    	"$(INTDIR)\strlcpy.obj" \
    	"$(INTDIR)\pthread-win32.obj"
     
     
    config: ..\..\include\pg_config.h pg_config_paths.h  ..\..\include\pg_config_os.h
     
    ..\..\include\pg_config.h: ..\..\include\pg_config.h.win32
    	copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
     
    ..\..\include\pg_config_os.h:
    	copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
     
    pg_config_paths.h: win32.mak
    	echo #define SYSCONFDIR "" > pg_config_paths.h
     
    "$(OUTDIR)" :
        if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
     
    CPP_PROJ=/nologo /W3 /EHsc $(OPT) $(FBM_LIBPQ_RAJOUT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "$(SSL_INC)" \
     /D "FRONTEND" $(DEBUGDEF) \
     /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" \
     /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c  \
     /D "_CRT_SECURE_NO_DEPRECATE" $(ADD_DEFINES)
     
    !IFDEF USE_SSL
    CPP_PROJ=$(CPP_PROJ) /D USE_SSL
    SSL_LIBS=ssleay32.lib libeay32.lib gdi32.lib
    !ENDIF
     
    !IFDEF USE_KFW
    CPP_PROJ=$(CPP_PROJ) /D KRB5
    KFW_LIBS=krb5_32.lib comerr32.lib gssapi32.lib
    !ENDIF
     
    !IFDEF ENABLE_THREAD_SAFETY
    CPP_PROJ=$(CPP_PROJ) /D ENABLE_THREAD_SAFETY
    !ENDIF
     
    CPP_SBRS=.
     
    RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libpq.res"
     
    LINK32=link.exe
    LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shfolder.lib wsock32.lib secur32.lib $(SSL_LIBS)  $(KFW_LIB) $(ADD_SECLIB) \
     /nologo /subsystem:windows /dll $(LOPT) /incremental:no \
     /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:$(CPU) \
     /out:"$(OUTDIR)\$(OUTFILENAME).dll"\
     /implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib"  \
     /libpath:"$(SSL_LIB_PATH)" /libpath:"$(KFW_LIB_PATH)" \
     /def:$(OUTFILENAME)dll.def
    LINK32_OBJS= \
    	"$(OUTDIR)\$(OUTFILENAME).lib" \
    	"$(OUTDIR)\libpq.res"
     
    # @<< is a Response file, http://www.opussoftware.com/tutorial/TutMakefile.htm
     
    "$(OUTDIR)\$(OUTFILENAME).lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
    	$(LIB32) @<<
    	$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
    <<
     
    "$(INTDIR)\libpq.res" : "$(INTDIR)" libpq.rc
    	$(RSC) $(RSC_PROJ) libpq.rc
     
     
    "$(OUTDIR)\$(OUTFILENAME).dll" : "$(OUTDIR)" "$(INTDIR)\libpq.res"
    	$(LINK32) @<<
    	$(LINK32_FLAGS) $(LINK32_OBJS)
    <<
    # Inclusion of manifest
    !IF "$(_NMAKE_VER)" != "6.00.9782.0"
            mt -manifest $(OUTDIR)\$(OUTFILENAME).dll.manifest -outputresource:$(OUTDIR)\$(OUTFILENAME).dll;2
    !ENDIF
     
    "$(INTDIR)\getaddrinfo.obj" : ..\..\port\getaddrinfo.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\getaddrinfo.c
    <<
     
    "$(INTDIR)\pgstrcasecmp.obj" : ..\..\port\pgstrcasecmp.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\pgstrcasecmp.c
    <<
     
    "$(INTDIR)\thread.obj" : ..\..\port\thread.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\thread.c
    <<
     
    "$(INTDIR)\inet_aton.obj" : ..\..\port\inet_aton.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\inet_aton.c
    <<
     
    "$(INTDIR)\crypt.obj" : ..\..\port\crypt.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\crypt.c
    <<
     
    "$(INTDIR)\noblock.obj" : ..\..\port\noblock.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\noblock.c
    <<
     
    "$(INTDIR)\md5.obj" : ..\..\backend\libpq\md5.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\backend\libpq\md5.c
    <<
     
    "$(INTDIR)\ip.obj" : ..\..\backend\libpq\ip.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\backend\libpq\ip.c
    <<
     
    "$(INTDIR)\wchar.obj" : ..\..\backend\utils\mb\wchar.c
    	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\backend\utils\mb\wchar.c
    <<
     
     
    "$(INTDIR)\encnames.obj" : ..\..\backend\utils\mb\encnames.c
    	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c
    <<
     
    "$(INTDIR)\snprintf.obj" : ..\..\port\snprintf.c
    	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\port\snprintf.c
    <<
     
    "$(INTDIR)\strlcpy.obj" : ..\..\port\strlcpy.c
    	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\port\strlcpy.c
    <<
     
    .c{$(CPP_OBJS)}.obj:
    	$(CPP) $(CPP_PROJ) $<
     
    .c.obj:
    	$(CPP) $(CPP_PROJ) $<
    Je récupère la sortie de la commande dans mon fichier report :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
     
    Building the Win32 static library...
     
     
    MACROS:
     
    PROCESSOR_IDENTIFIER = x86 Family 15 Model 2 Stepping 9, GenuineIntel
          INCLUDE = C:\SQL\INCLUDE
      LIB32_FLAGS = $(LOPT) /nologo /out:"$(OUTDIR)\$(OUTFILENAME).lib"
          COMSPEC = C:\WINDOWS\system32\cmd.exe
       _NMAKE_VER = 9.00.21022.08
          PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
             MAKE = "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\nmake.exe"
      LINK32_OBJS = "$(OUTDIR)\$(OUTFILENAME).lib"  "$(OUTDIR)\libpq.res"
          KFW_INC = C:\Program Files\MIT\Kerberos\inc
       SYSTEMROOT = C:\WINDOWS
          SSL_INC = C:\OpenSSL\include\openssl
             PATH = C:\Program Files\Windows Resource Kits\Tools\;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\SQL\DLL;C:\SQL\BIN;C:\Program Files\Hummingbird\Connectivity\8.00\Accessories\;C:\Program Files\doxygen\bin;C:\Program Files\Java\jdk1.5.0_09\bin;C:\Program Files\Java\jdk1.5.0_09\lib;C:\jDKDoJa2.5\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\MIT\Kerberos\bin
    NUMBER_OF_PROCESSORS = 1
         DEBUGDEF = /D NDEBUG
             TEMP = D:\USERSD~1\FRANCO~1.BEN\LOCALS~1\Temp
      OUTFILENAME = libpq
             NULL = 
            LIB32 = link.exe -lib
             LOPT = 
      SESSIONNAME = Console
      USERPROFILE = D:\UsersData\francois.benoit-mar
    COMMONPROGRAMFILES = C:\Program Files\Fichiers communs
      LOGONSERVER = \\S92C03539
         HOMEPATH = \UsersData\francois.benoit-mar
     LINK32_FLAGS = kernel32.lib user32.lib advapi32.lib shfolder.lib wsock32.lib secur32.lib $(SSL_LIBS)  $(KFW_LIB) $(ADD_SECLIB)  /nologo /subsystem:windows /dll $(LOPT) /incremental:no  /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:$(CPU)  /out:"$(OUTDIR)\$(OUTFILENAME).dll" /implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib"   /libpath:"$(SSL_LIB_PATH)" /libpath:"$(KFW_LIB_PATH)"  /def:$(OUTFILENAME)dll.def
      SYSTEMDRIVE = C:
         USERNAME = francois.benoit
         CPP_OBJS = .\Release/
         CPP_SBRS = .
    ALLUSERSPROFILE = D:\UsersData\All Users
         CPP_PROJ = $(CPP_PROJ) /D ENABLE_THREAD_SAFETY
    		/nologo /W3 /EHsc $(OPT) $(FBM_LIBPQ_RAJOUT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "$(SSL_INC)"  /D "FRONTEND" $(DEBUGDEF)  /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch"  /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c   /D "_CRT_SECURE_NO_DEPRECATE" $(ADD_DEFINES)
         RSC_PROJ = /l 0x409 /fo"$(INTDIR)\libpq.res"
               CC = cl
     PROGRAMFILES = C:\Program Files
        MAKEFLAGS = DPA               
    PROCESSOR_REVISION = 0209
     COMPUTERNAME = P01845
           LINK32 = link.exe
               AS = ml
               RC = rc
    PROCESSOR_LEVEL = 15
    PROCESSOR_ARCHITECTURE = x86
               OS = Windows_NT
        HOMEDRIVE = D:
     OPENSSL_CONF = C:\OpenSSL\bin\openssl.cnf
     KFW_LIB_PATH = C:\Program Files\MIT\Kerberos\lib\i386
     SSL_LIB_PATH = C:\OpenSSL\lib\VC
           SYBASE = C:\SQL
       LIB32_OBJS = "$(INTDIR)\win32.obj"  "$(INTDIR)\getaddrinfo.obj"  "$(INTDIR)\pgstrcasecmp.obj"  "$(INTDIR)\thread.obj"  "$(INTDIR)\inet_aton.obj"  "$(INTDIR)\crypt.obj"  "$(INTDIR)\noblock.obj"  "$(INTDIR)\md5.obj"  "$(INTDIR)\ip.obj"  "$(INTDIR)\fe-auth.obj"  "$(INTDIR)\fe-protocol2.obj"  "$(INTDIR)\fe-protocol3.obj"  "$(INTDIR)\fe-connect.obj"  "$(INTDIR)\fe-exec.obj"  "$(INTDIR)\fe-lobj.obj"  "$(INTDIR)\fe-misc.obj"  "$(INTDIR)\fe-print.obj"  "$(INTDIR)\fe-secure.obj"  "$(INTDIR)\pqexpbuffer.obj"  "$(INTDIR)\pqsignal.obj"  "$(INTDIR)\wchar.obj"  "$(INTDIR)\encnames.obj"  "$(INTDIR)\snprintf.obj"  "$(INTDIR)\strlcpy.obj"  "$(INTDIR)\pthread-win32.obj"
           INTDIR = .\Release
           WINDIR = C:\WINDOWS
    VS90COMNTOOLS = C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
           OUTDIR = .\Release
              LIB = C:\SQL\LIB
    USERDNSDOMAIN = AD.MEDIAPOST.FR
    FBM_LIBPQ_RAJOUT = -I "C:\Program Files\Microsoft Visual Studio\VC98\Include" -I "C:\Program Files\Microsoft Visual Studio 9.0\VC\include"
           PROMPT = $P$G
              CPP = cl.exe
    		cl
              RSC = rc.exe
              CPU = i386
    ENABLE_THREAD_SAFETY = 1
    FP_NO_HOST_CHECK = NO
              TMP = D:\USERSD~1\FRANCO~1.BEN\LOCALS~1\Temp
              OPT = /O2 /MD
              CXX = cl
       USERDOMAIN = AD
          APPDATA = D:\UsersData\francois.benoit-mar\Application Data
          MAKEDIR = M:\Structure cible\Applications\Externe\PostGreSQL\postgresql-8.3.1\src\interfaces\libpq
     
     
    REGLES D'INFÉRENCE :
     
    .asm.obj::
    	commandes:	$(AS) $(AFLAGS) /c $<
     
    .asm.exe:
    	commandes:	$(AS) $(AFLAGS) $<
     
    .c.obj:
    	commandes:	$(CPP) $(CPP_PROJ) $<
     
    .c{.\Release/}.obj:
    	commandes:	$(CPP) $(CPP_PROJ) $<
     
    .c.exe:
    	commandes:	$(CC) $(CFLAGS) $<
     
    .cc.obj::
    	commandes:	$(CC) $(CFLAGS) /c $<
     
    .cc.exe:
    	commandes:	$(CC) $(CFLAGS) $<
     
    .cpp.obj::
    	commandes:	$(CPP) $(CPPFLAGS) /c $<
     
    .cpp.exe:
    	commandes:	$(CPP) $(CPPFLAGS) $<
     
    .cxx.obj::
    	commandes:	$(CXX) $(CXXFLAGS) /c $<
     
    .cxx.exe:
    	commandes:	$(CXX) $(CXXFLAGS) $<
     
    .rc.res:
    	commandes:	$(RC) $(RFLAGS) /r $<
     
    .SUFFIXES: .obj .asm .c .cc .cpp .cxx .f .f90 .for .rc 
     
    CIBLES:
     
    pg_config_paths.h: 
    	indicateurs:	-d 
    	dépendants:	win32.mak 
    	commandes:	echo #define SYSCONFDIR "" > pg_config_paths.h
     
    ".\Release\snprintf.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\snprintf.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\port\snprintf.c
    <<
     
    ".\Release\libpq.lib": 
    	indicateurs:	-d 
    	dépendants:	".\Release" ".\Release\win32.obj" ".\Release\getaddrinfo.obj" 
    			".\Release\pgstrcasecmp.obj" ".\Release\thread.obj" 
    			".\Release\inet_aton.obj" ".\Release\crypt.obj" 
    			".\Release\noblock.obj" ".\Release\md5.obj" 
    			".\Release\ip.obj" ".\Release\fe-auth.obj" 
    			".\Release\fe-protocol2.obj" ".\Release\fe-protocol3.obj" 
    			".\Release\fe-connect.obj" ".\Release\fe-exec.obj" 
    			".\Release\fe-lobj.obj" ".\Release\fe-misc.obj" 
    			".\Release\fe-print.obj" ".\Release\fe-secure.obj" 
    			".\Release\pqexpbuffer.obj" ".\Release\pqsignal.obj" 
    			".\Release\wchar.obj" ".\Release\encnames.obj" 
    			".\Release\snprintf.obj" ".\Release\strlcpy.obj" 
    			".\Release\pthread-win32.obj" 
    	commandes:	$(LIB32) @<<
    	$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
    <<
     
    ".\Release\wchar.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\backend\utils\mb\wchar.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\backend\utils\mb\wchar.c
    <<
     
    ".\Release\libpq.dll": 
    	indicateurs:	-d 
    	dépendants:	".\Release" ".\Release\libpq.res" 
    	commandes:	$(LINK32) @<<
    	$(LINK32_FLAGS) $(LINK32_OBJS)
    <<
    			       mt -manifest $(OUTDIR)\$(OUTFILENAME).dll.manifest -outputresource:$(OUTDIR)\$(OUTFILENAME).dll;2
     
    config: 
    	indicateurs:	-d 
    	dépendants:	..\..\include\pg_config.h pg_config_paths.h 
    			..\..\include\pg_config_os.h 
    	commandes:	
     
    ".\Release\libpq.res": 
    	indicateurs:	-d 
    	dépendants:	".\Release" libpq.rc 
    	commandes:	$(RSC) $(RSC_PROJ) libpq.rc
     
    ".\Release\noblock.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\noblock.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\noblock.c
    <<
     
    ".\Release\pgstrcasecmp.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\pgstrcasecmp.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\pgstrcasecmp.c
    <<
     
    ".\Release\crypt.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\crypt.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\crypt.c
    <<
     
    ".\Release\ip.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\backend\libpq\ip.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\backend\libpq\ip.c
    <<
     
    ".\Release": 
    	indicateurs:	-d 
    	dépendants:	
    	commandes:	   if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
     
    ALL: 
    	indicateurs:	-d 
    	dépendants:	config ".\Release\libpq.lib" ".\Release\libpq.dll" 
     
    	commandes:	
     
    ".\Release\getaddrinfo.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\getaddrinfo.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\getaddrinfo.c
    <<
     
    CLEAN: 
    	indicateurs:	-d 
    	dépendants:	
    	commandes:	-@erase "$(INTDIR)\getaddrinfo.obj"
    			-@erase "$(INTDIR)\pgstrcasecmp.obj"
    			-@erase "$(INTDIR)\thread.obj"
    			-@erase "$(INTDIR)\inet_aton.obj"
    			-@erase "$(INTDIR)\crypt.obj"
    			-@erase "$(INTDIR)\noblock.obj"
    			-@erase "$(INTDIR)\md5.obj"
    			-@erase "$(INTDIR)\ip.obj"
    			-@erase "$(INTDIR)\fe-auth.obj"
    			-@erase "$(INTDIR)\fe-protocol2.obj"
    			-@erase "$(INTDIR)\fe-protocol3.obj"
    			-@erase "$(INTDIR)\fe-connect.obj"
    			-@erase "$(INTDIR)\fe-exec.obj"
    			-@erase "$(INTDIR)\fe-lobj.obj"
    			-@erase "$(INTDIR)\fe-misc.obj"
    			-@erase "$(INTDIR)\fe-print.obj"
    			-@erase "$(INTDIR)\fe-secure.obj"
    			-@erase "$(INTDIR)\pqexpbuffer.obj"
    			-@erase "$(INTDIR)\pqsignal.obj"
    			-@erase "$(OUTDIR)\win32.obj"
    			-@erase "$(INTDIR)\wchar.obj"
    			-@erase "$(INTDIR)\encnames.obj"
    			-@erase "$(INTDIR)\pthread-win32.obj"
    			-@erase "$(INTDIR)\snprintf.obj"
    			-@erase "$(INTDIR)\strlcpy.obj"
    			-@erase "$(OUTDIR)\$(OUTFILENAME).lib"
    			-@erase "$(OUTDIR)\$(OUTFILENAME)dll.lib"
    			-@erase "$(OUTDIR)\libpq.res"
    			-@erase "$(OUTDIR)\$(OUTFILENAME).dll"
    			-@erase "$(OUTDIR)\$(OUTFILENAME)dll.exp"
    			-@erase "$(OUTDIR)\$(OUTFILENAME).dll.manifest"
    			-@erase "$(OUTDIR)\*.idb"
    			-@erase pg_config_paths.h"
     
    ".\Release\strlcpy.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\strlcpy.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\port\strlcpy.c
    <<
     
    ".\Release\thread.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\thread.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\thread.c
    <<
     
    ..\..\include\pg_config.h: 
    	indicateurs:	-d 
    	dépendants:	..\..\include\pg_config.h.win32 
    	commandes:	copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
     
    ..\..\include\pg_config_os.h: 
    	indicateurs:	-d 
    	dépendants:	
    	commandes:	copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
     
    ".\Release\inet_aton.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\port\inet_aton.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\inet_aton.c
    <<
     
    ".\Release\md5.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\backend\libpq\md5.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) ..\..\backend\libpq\md5.c
    <<
     
    ".\Release\encnames.obj": 
    	indicateurs:	-d 
    	dépendants:	..\..\backend\utils\mb\encnames.c 
    	commandes:	$(CPP) @<<
    	$(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c
    <<
     
     
    ven., mars 14 2008 01:57:34         ..\..\include\pg_config.h.win32
    ven., mars 14 2008 01:57:34       ..\..\include\pg_config.h
    	copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
            1 fichier(s) copi‚(s).
    lun., mai 19 2008 12:59:16         win32.mak
    lun., mai 19 2008 17:19:38       pg_config_paths.h
    	echo #define SYSCONFDIR "" > pg_config_paths.h
    mer., janv. 09 2008 11:16:42       ..\..\include\pg_config_os.h
    	copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
            1 fichier(s) copi‚(s).
                                  config la cible n'existe pas
    mar., avr. 22 2008 18:42:04       ".\Release"
    	if not exist ".\Release/" mkdir ".\Release"
    lun., mai 19 2008 17:19:39       ".\Release\win32.obj"
    mar., janv. 01 2008 21:46:00         "win32.c"
    	cl.exe /nologo /W3 /EHsc /O2 /MD -I "C:\Program Files\Microsoft Visual Studio\VC98\Include" -I "C:\Program Files\Microsoft Visual Studio 9.0\VC\include" /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "C:\OpenSSL\include\openssl"  /D "FRONTEND" /D NDEBUG  /D "WIN32" /D "_WINDOWS" /Fp".\Release\libpq.pch"  /Fo".\Release\\" /Fd".\Release\\" /FD /c   /D "_CRT_SECURE_NO_DEPRECATE"  /D ENABLE_THREAD_SAFETY "win32.c"
    win32.c
    mar., janv. 01 2008 21:46:00         ..\..\port\getaddrinfo.c
    mar., avr. 22 2008 18:42:14       ".\Release\getaddrinfo.obj"
    	cl.exe @D:\USERSD~1\FRANCO~1.BEN\LOCALS~1\Temp\nmD.tmp
    getaddrinfo.c
    ..\..\include\libpq/pqcomm.h(64) : error C2079: 'addr' utilise une struct de 'sockaddr_storage' non d‚fini
    ..\..\port\getaddrinfo.c(144) : error C2079: 'hints' utilise une struct de 'addrinfo' non d‚fini
    ..\..\port\getaddrinfo.c(159) : error C2224: la partie gauche de '.ai_family' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(160) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(165) : error C2224: la partie gauche de '.ai_family' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(165) : error C2224: la partie gauche de '.ai_family' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(168) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(169) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(182) : error C2224: la partie gauche de '.ai_flags' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(223) : error C2224: la partie gauche de '.ai_flags' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(236) : error C2027: utilisation du type non d‚fini 'addrinfo'
            ..\..\include\getaddrinfo.h(153)ÿ: voir la d‚claration de 'addrinfo'
    ..\..\port\getaddrinfo.c(249) : error C2037: la partie gauche de 'ai_flags' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(250) : error C2037: la partie gauche de 'ai_family' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(251) : error C2037: la partie gauche de 'ai_socktype' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(251) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(252) : error C2037: la partie gauche de 'ai_protocol' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(252) : error C2224: la partie gauche de '.ai_protocol' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(253) : error C2037: la partie gauche de 'ai_addrlen' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(254) : error C2037: la partie gauche de 'ai_addr' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(255) : error C2037: la partie gauche de 'ai_canonname' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(256) : error C2037: la partie gauche de 'ai_next' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(282) : error C2037: la partie gauche de 'ai_addr' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(283) : error C2037: la partie gauche de 'ai_addr' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(283) : error C2198: 'free'ÿ: pas assez d'arguments pour un appel
    Il me semble donc que la règle suivante "plante" :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    "$(INTDIR)\getaddrinfo.obj" : ..\..\port\getaddrinfo.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\getaddrinfo.c
    <<
    Je ne comprends pas ce que signifie @<< dans ce code....

    J'obtiens alors comme indiqué plus haut :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    mar., avr. 22 2008 18:42:14       ".\Release\getaddrinfo.obj"
    	cl.exe @D:\USERSD~1\FRANCO~1.BEN\LOCALS~1\Temp\nmD.tmp
    getaddrinfo.c
    ..\..\include\libpq/pqcomm.h(64) : error C2079: 'addr' utilise une struct de 'sockaddr_storage' non d‚fini
    ..\..\port\getaddrinfo.c(144) : error C2079: 'hints' utilise une struct de 'addrinfo' non d‚fini
    ..\..\port\getaddrinfo.c(159) : error C2224: la partie gauche de '.ai_family' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(160) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(165) : error C2224: la partie gauche de '.ai_family' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(165) : error C2224: la partie gauche de '.ai_family' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(168) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(169) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(182) : error C2224: la partie gauche de '.ai_flags' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(223) : error C2224: la partie gauche de '.ai_flags' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(236) : error C2027: utilisation du type non d‚fini 'addrinfo'
            ..\..\include\getaddrinfo.h(153)ÿ: voir la d‚claration de 'addrinfo'
    ..\..\port\getaddrinfo.c(249) : error C2037: la partie gauche de 'ai_flags' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(250) : error C2037: la partie gauche de 'ai_family' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(251) : error C2037: la partie gauche de 'ai_socktype' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(251) : error C2224: la partie gauche de '.ai_socktype' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(252) : error C2037: la partie gauche de 'ai_protocol' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(252) : error C2224: la partie gauche de '.ai_protocol' doit avoir un type struct/union
    ..\..\port\getaddrinfo.c(253) : error C2037: la partie gauche de 'ai_addrlen' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(254) : error C2037: la partie gauche de 'ai_addr' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(255) : error C2037: la partie gauche de 'ai_canonname' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(256) : error C2037: la partie gauche de 'ai_next' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(282) : error C2037: la partie gauche de 'ai_addr' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(283) : error C2037: la partie gauche de 'ai_addr' indique un struct/union non d‚fini 'addrinfo'
    ..\..\port\getaddrinfo.c(283) : error C2198: 'free'ÿ: pas assez d'arguments pour un appel
    Pourquoi ai-je uniquement la ligne suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    cl.exe @D:\USERSD~1\FRANCO~1.BEN\LOCALS~1\Temp\nmD.tmp
    getaddrinfo.c
    Où sont passées mes options de compilation $(CPP_PROJ) ????

  2. #2
    Inactif
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    245
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2004
    Messages : 245
    Points : 262
    Points
    262
    Par défaut
    Bonjour
    Difficile de vous aider je n'ai pas votre compilateur installé actuellement
    Pour l'erreur allez a cette adresse qui traite ce sujet précis
    http://beej.us/guide/bgnet/output/ht...bynameman.html
    Bon courage

  3. #3
    Membre régulier
    Inscrit en
    Avril 2008
    Messages
    89
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 89
    Points : 83
    Points
    83
    Par défaut Débutant persistant :D
    Merci pour le post.

    Je suis allé faire un tour sur le lien.
    Pour l'instant cela ne m'éclaire pas plus mais dès que j'aurai du temps je me pencherai un peu plus sur la question.
    Peut-être la solution à mon problème est-elle sur l'une de ces pages.

    Par contre vu que vous avez l'air de connaitre un peu la syntaxe de winmake je voulais réitérer une question qui m'interpèle :

    J'ai la régle suivante dans mon winmake :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    "$(INTDIR)\getaddrinfo.obj" : ..\..\port\getaddrinfo.c
    	$(CPP) @<<
    	$(CPP_PROJ) ..\..\port\getaddrinfo.c
    <<
    et lors de l'exécution j'obtiens le code suivant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    cl.exe @D:\USERSD~1\FRANCO~1.BEN\LOCALS~1\Temp\nmD.tmp getaddrinfo.c
    Que signifie @<< dans ce cas (j'ai fouillé sur le net mais je ne vois pas grand chose qui colle à mon problème) ?
    Où sont passés mais champs $(CPP_PROJ) ?

  4. #4
    Inactif
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    245
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2004
    Messages : 245
    Points : 262
    Points
    262
    Par défaut
    Bounjour
    Vous devriez poser la question a Microsoft via le site Technet
    Pour moi il s'agit d'une information de type flux iostream ( << ???<< ) pour retrouver le fichier 2 répertoires en dessous. @avec un complement doit servir a orienter un chemin de base type intranet.
    Ce n'est pas specifique a votre winmake.
    Essayez de compiler avec G++ ou OpenWatcom pour mieux comprendre le reel problème.
    Bon courage.

  5. #5
    Membre régulier
    Inscrit en
    Avril 2008
    Messages
    89
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 89
    Points : 83
    Points
    83
    Par défaut [débutant toujours]
    Voilà j'ai un sérieux problème avec la compilation de cette bibliothèque sous Windows en utilisant le compilo nmake fournit par Visual C++ 9.0.

    Mais est-il nécessaire que je compile mes fichiers dll, obj, et autres ainsi ?

    En clair, puis-je compiler ma dll sous un autre environnement (Linux, Cygwin) et en utilisant un autre compilateur (gcc ou autre) pour ensuite appeler les fonctions de cette dernière dans Visual C++ 9.0 ?

    J'avais déjà une version compilée de la bibliothèque mais lors de l'édition de lien sous Visual C++ 9.0, le linker me renvoyait un message d'erreur du type "Impossible de lire à l'adresse 'CX02machintrucmuch' de libpq.dll".

    Après avoir lancé quelques posts sur la toile, j'en ai déduit que ma bibliothèque n'avait pas été compilée avec le nmake de Visual C++ 9.0 et que c'est cela qui posait problème...

    Mais est-ce vraiment le cas ?

  6. #6
    Membre régulier
    Inscrit en
    Avril 2008
    Messages
    89
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 89
    Points : 83
    Points
    83
    Par défaut RESOLU
    Super !

    Je viens enfin d'arriver à compiler un programme sous Visual C++ 2008 version 9 utilisant la bibliothèque "libpq".

    Je m'étais un peu égaré et pour résumer les manips à faire sont les suivantes :

    1°) Avoir le source de PostGreSQL (downloader sur http://www.postgresql.org)
    2°) Avoir Visual C++ 2008 version 9.0

    DANS UNE CONSOLE :
    4°) Lancer VCVARS32 dans la console !!!!!!! (Pour éviter d'avoir à se taper à la main la définition des variables d'environnement ... c'est de là que provenaient sûrement toute mes erreurs)
    5°) Aller dans le répertoire src de PostGreSQL (Celui où se trouve le fichier win32.mak et le répertoire nommé interface) toujours depuis la console.
    6°) Lancer nmake /f win32.mak
    7°) Ca compile et si on a pas de message d'erreur on peut fermer.

    OUVRIR VISUAL C++ 2008 :
    8°) Créer un nouveau projet console application win 32 simple.
    9°) Taper par exemple le code suivant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
     
    #include "stdafx.h"
     
     
    //NE PAS OUBLIER CE FICHIER D'INCLUDE !!!!
    #include <libpq-fe.h>
     
    int _tmain(int argc, _TCHAR* argv[])
    {
    	const char *connectionInfo;
    	PGconn *connection;
    	PGresult *result;
    	connectionInfo = "host=ton_host, dbname=ta_base, user=ton_nom, password='ton code'";
    	connection = PQconnectdb(connectionInfo);
    	if(PQstatus(connection) != CONNECTION_OK)
    	{
    		printf("Connection not established\n");
    	}
    	else
    	{
    		printf("Connection is established\n");
    	}
    	return 0;
    }
    10°) Ensuite dans Projet->Options de mon_projet->Editeur de lien->Dépendances supplémentaires , rajouter libpqdll.lib

    11°) Dans Outil->Options->Projets et solutions->Répertoire VC++

    a--afficher les répertoires pour Include et rajouter :
    monchemindacces\src\interfaces\libpq
    monchemindacces\src\include
    a--afficher les répertoires pour Bibliothèque et rajouter :
    monchemindacces\src\interfaces\libpq\Release

    12°) Voilà vous pouvez compiler (F7) et vérifier que votre executable a été créé. Ce qui est déjà ça !

    13°) Pour pouvoir le lancer il vous faut mettre dans le même répertoire que l'exe le fichier libpq.dll ! Avant de rendre la chose plus propre;

    Voilà j'espère que cela pourra aider certains !
    N'hésitez pas pour plus de renseignements...

  7. #7
    Membre régulier
    Inscrit en
    Avril 2008
    Messages
    89
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 89
    Points : 83
    Points
    83
    Par défaut Erratum
    Dans le post précédent concernant le champ connectionInfo, j'ai fait une petite boulette...

    Il faut enlever les virgules et utiliser uniquement des espaces pour séparer les éléments de connection.

    Au lieu de :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    connectionInfo = "host=ton_host, dbname=ta_base, user=ton_nom, password='ton code'";
    Mettre :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    connectionInfo = "host=ton_host dbname=ta_base user=ton_nom password='ton code'";
    Avec ça, j'ai un programme qui fonctionne et utilise libpq pour se connecter à mon serveur postgre :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    D:\.....donnees_persos.....\Visual Studio 2008\Projects\libpq_test\Debug>libpq_test.exe
    host = *********
    base de donnee = BD_DEV
    port = 5432
    user = postgres
    password = *******
    Connection etablie...
    Il y a dans la table both_voie_apparie...455922champs !
    Pour vous donner un peu de motivation... Bon courage et n'hésitez pas à poster en cas de problème avec cette méthode.

    PS : normalement ça devrait fonctionner aussi avec la version 7 de Visual C++. Donc si qq s'y met qu'il indique si ça fonctionne...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Compilation pour débutant
    Par router_ dans le forum Débuter avec Java
    Réponses: 4
    Dernier message: 24/06/2010, 22h38
  2. petite question de compilation pour débutant
    Par flamant dans le forum Débuter avec Java
    Réponses: 4
    Dernier message: 21/09/2007, 15h19
  3. [Débutant]Compilation d'un fichier .java
    Par adilou1981 dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 15/04/2005, 14h46
  4. [Débutant]Erreur compilation !
    Par gandalf_le_blanc dans le forum AWT/Swing
    Réponses: 23
    Dernier message: 30/08/2004, 14h23
  5. [Débutant]Classe d'Authentification : compilation impossible
    Par acyclique dans le forum Servlets/JSP
    Réponses: 4
    Dernier message: 23/08/2003, 19h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo