Обсуждение: Visio, new DLL

Поиск
Список
Период
Сортировка

Visio, new DLL

От
Kovacs Zoltan
Дата:
I've read that Max Khon compiled a DLL and wrote something interesting
about Visio and PostgreSQL. Is this reverse engineering software public?
We work with Visio and this tool could be useful for us as well.

I also tried to compile PSQLODBC.DLL from the 7.1beta4 source and it was
not successful. I got these messages (compiling was successful):

--------------------Configuration: psqlodbc - Win32 Debug--------------------
Begining build with project "c:\TEMP\PSQLODBC\psqlodbc\psqlodbc.dsp", at root.
Active configuration is Win32 (x86) Dynamic-Link Library (based on Win32 (x86) Dynamic-Link Library)

Project's tools are:
            "32-bit C/C++ Compiler for 80x86" with flags "/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS"/Fp"Debug/psqlodbc.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c " 
            "OLE Type Library Maker" with flags "/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 "
            "Win32 Resource Compiler" with flags "/l 0x40e /fo"Debug/psqlodbc.res" /d "_DEBUG" "
            "Browser Database Maker" with flags "/nologo /o"Debug/psqlodbc.bsc" "
            "COFF Linker for 80x86" with flags "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.libshell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows
/dll/incremental:yes /pdb:"Debug/psqlodbc.pdb" /debug /machine:I386 /def:".\psqlodbc.def" /out:"Debug/psqlodbc.dll"
/implib:"Debug/psqlodbc.lib"/pdbtype:sept " 
            "Custom Build" with flags ""
            "<Component 0xa>" with flags ""

Creating command line "rc.exe /l 0x40e /fo"Debug/psqlodbc.res" /d "_DEBUG" "C:\temp\psqlodbc\psqlodbc\psqlodbc.rc""
Creating temp file "C:\WINDOWS\TEMP\RSP143.TMP" with contents </nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG"
/D"_WINDOWS" /Fp"Debug/psqlodbc.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c  
"C:\temp\psqlodbc\psqlodbc\columninfo.c"
"C:\temp\psqlodbc\psqlodbc\connection.c"
"C:\temp\psqlodbc\psqlodbc\convert.c"
"C:\temp\psqlodbc\psqlodbc\dlg_specific.c"
"C:\temp\psqlodbc\psqlodbc\drvconn.c"
"C:\temp\psqlodbc\psqlodbc\environ.c"
"C:\temp\psqlodbc\psqlodbc\execute.c"
"C:\temp\psqlodbc\psqlodbc\gpps.c"
"C:\temp\psqlodbc\psqlodbc\info.c"
"C:\temp\psqlodbc\psqlodbc\lobj.c"
"C:\temp\psqlodbc\psqlodbc\misc.c"
"C:\temp\psqlodbc\psqlodbc\options.c"
"C:\temp\psqlodbc\psqlodbc\parse.c"
"C:\temp\psqlodbc\psqlodbc\pgtypes.c"
"C:\temp\psqlodbc\psqlodbc\psqlodbc.c"
"C:\temp\psqlodbc\psqlodbc\qresult.c"
"C:\temp\psqlodbc\psqlodbc\results.c"
"C:\temp\psqlodbc\psqlodbc\setup.c"
"C:\temp\psqlodbc\psqlodbc\socket.c"
"C:\temp\psqlodbc\psqlodbc\statement.c"
"C:\temp\psqlodbc\psqlodbc\tuple.c"
"C:\temp\psqlodbc\psqlodbc\tuplelist.c"
"C:\temp\psqlodbc\psqlodbc\bind.c"
>
Creating command line "cl.exe @C:\WINDOWS\TEMP\RSP143.TMP"
Creating temp file "C:\WINDOWS\TEMP\RSP0144.TMP" with contents <kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.libadvapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo
/subsystem:windows/dll /incremental:yes /pdb:"Debug/psqlodbc.pdb" /debug /machine:I386 /def:".\psqlodbc.def"
/out:"Debug/psqlodbc.dll"/implib:"Debug/psqlodbc.lib" /pdbtype:sept  
.\Debug\columninfo.obj
.\Debug\connection.obj
.\Debug\convert.obj
.\Debug\dlg_specific.obj
.\Debug\drvconn.obj
.\Debug\environ.obj
.\Debug\execute.obj
.\Debug\gpps.obj
.\Debug\info.obj
.\Debug\lobj.obj
.\Debug\misc.obj
.\Debug\options.obj
.\Debug\parse.obj
.\Debug\pgtypes.obj
.\Debug\psqlodbc.obj
.\Debug\psqlodbc.res
.\Debug\qresult.obj
.\Debug\results.obj
.\Debug\setup.obj
.\Debug\socket.obj
.\Debug\statement.obj
.\Debug\tuple.obj
.\Debug\tuplelist.obj
.\Debug\bind.obj>
Creating command line "link.exe @C:\WINDOWS\TEMP\RSP0144.TMP"
Compiling resources...
Compiling...
columninfo.c
connection.c
convert.c
dlg_specific.c
drvconn.c
environ.c
execute.c
gpps.c
info.c
lobj.c
misc.c
options.c
parse.c
pgtypes.c
psqlodbc.c
qresult.c
results.c
setup.c
socket.c
statement.c
tuple.c
tuplelist.c
bind.c
Linking...
LINK : fatal error LNK1104: cannot open file "LIBCMTD.lib"
Error executing link.exe.

psqlodbc.dll - 1 error(s), 0 warning(s)
---------------------------------------------------------------------------

I used Visual Developer Studio 5.0.

After then, I tried to convert the result project into Borland C++ Builder
4. Here is the log file:

--------------------------------------------------------------------------
Reading configurations from .\psqlodbc.dsp
Finished reading configurations from .\psqlodbc.dsp
 Converting C:\temp\winodbc\psqlodbc.dsw
Generating project group file C:\temp\winodbc\psqlodbc.bpg
psqlodbc.bpg generated
Done converting workspace file C:\temp\winodbc\psqlodbc.dsw
 Converting .\psqlodbc.dsp
Using configuration "psqlodbc - Win32 Debug"
Warning: no conversion for compiler option: /Gm
Warning: no conversion for compiler option: /FD
Warning: no conversion for linker option: /PDBTYPE:SEPT
Generating psqlodbc.bpr
Main .c source file detected
BCB IDE requires projects have a .cpp file as the main source file
.\psqlodbc.c will be copied to a .cpp extension.
Main file .\psqlodbc.cpp modified, original in .\psqlodbc.~cp
----------------------------------------------------------------------------

I also got a linker error after the successful compilation:

Unresolved external 'getGlobalDefault(char* ,char*, char)' referenced from
PSQLODBC.OBJ.

The documentation says: "...If you are linking C++ code with C modules,
you might have forgotten to wrap C external declarations in extern "C"..."
I think the solution for this would be placing some "extern" keyword but
I'm quite poor in C++. The reason why my opinion is this is that
psqlodbc.c has been changed to psqlodbc.cpp.

I would offer making a compiled DLL version available as soon as
possible after releasing the PostgreSQL source. I can also offer making
some extra files and HOWTO if someone else tries to compile this with
Borland C++ Builder directly (without Microsoft Developer Studio), but
currently I cannot make a new DLL at all. (Max, could you please publish
your DLL?)

However, my last compiled DLL (which works well with 7.0.2) seems to work
without any errors with 7.1beta4. We are still testing... :-)

Regards,

------------------------------------------------------------------------
Zoltan Kovacs
system designing leader at Trend Ltd, J\'aszber\'eny
assistant teacher in mathematics at Bolyai Institute, Szeged

http://www.trendkft.hu
http://www.math.u-szeged.hu/~kovzol


RE: Visio, new DLL

От
Dave Page
Дата:

> -----Original Message-----
> From: Kovacs Zoltan [mailto:kovacsz@pc10.radnoti-szeged.sulinet.hu]
> Sent: 03 February 2001 11:16
> To: pgsql-odbc@postgresql.org
> Cc: fjoe@iclub.nsu.ru
> Subject: [ODBC] Visio, new DLL
>
>
> I've read that Max Khon compiled a DLL and wrote something interesting
> about Visio and PostgreSQL. Is this reverse engineering
> software public?
> We work with Visio and this tool could be useful for us as well.
>
> I also tried to compile PSQLODBC.DLL from the 7.1beta4 source
> and it was
> not successful.

I've just updated from CVS and it compiles fine on my machine using M$ VC++
6.0 SP4 (there are 11 warnings all of which are one of these:

C:\DOCUMENTS AND SETTINGS\DPAGE\MY
DOCUMENTS\CVS\pgsql\src\interfaces\odbc\setup.c(127) : warning C4028: formal
parameter 2 different from declaration

C:\DOCUMENTS AND SETTINGS\DPAGE\MY
DOCUMENTS\CVS\pgsql\src\interfaces\odbc\setup.c(127) : warning C4024:
'DialogBoxParamA' : different types for formal and actual parameter 4

C:\DOCUMENTS AND SETTINGS\DPAGE\MY
DOCUMENTS\CVS\pgsql\src\interfaces\odbc\info.c(2318) : warning C4700: local
variable 'htbl_stmt' used without having been initialized

none of which should be a major problem. If it helps, I created my workspace
by creating a new empty Win32 Console dll, adding wsock32.lib to the
libraries under Link Options and then adding *.c, *.h, psqlodbc.def and
psqlodbc.rc to the project.

Regards, Dave.

Re: Visio, new DLL

От
Hiroshi Inoue
Дата:
Kovacs Zoltan wrote:
>
> I've read that Max Khon compiled a DLL and wrote something interesting
> about Visio and PostgreSQL. Is this reverse engineering software public?
> We work with Visio and this tool could be useful for us as well.
>
> I also tried to compile PSQLODBC.DLL from the 7.1beta4 source and it was
> not successful. I got these messages (compiling was successful):
>
> --------------------Configuration: psqlodbc - Win32 Debug--------------------

Seems you are compiling in debug mode.
Do you have LIBCMTD.lib(Multi Thread Debug ??) in
your environment ?

Regards,
Hiroshi Inoue

Re: Visio, new DLL

От
Kovacs Zoltan
Дата:
> > --------------------Configuration: psqlodbc - Win32 Debug--------------------
>
> Seems you are compiling in debug mode.
> Do you have LIBCMTD.lib(Multi Thread Debug ??) in
> your environment ?
I also tried a Release build (which requires LIBCMT.lib) without
success. Do you think I have an incomplete installation? (I didn't find
any LIBCMT*.* files in my environment.)

TIA, Zoltan

--
                         Kov\'acs, Zolt\'an
                         kovacsz@pc10.radnoti-szeged.sulinet.hu
                         http://www.math.u-szeged.hu/~kovzol
                         ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz


Re: Visio, new DLL

От
Hiroshi Inoue
Дата:
Kovacs Zoltan wrote:
>
> > > --------------------Configuration: psqlodbc - Win32 Debug--------------------
> >
> > Seems you are compiling in debug mode.
> > Do you have LIBCMTD.lib(Multi Thread Debug ??) in
> > your environment ?
> I also tried a Release build (which requires LIBCMT.lib) without
> success. Do you think I have an incomplete installation? (I didn't find
> any LIBCMT*.* files in my environment.)
>

I don't know if you have an incomplete installation.
I could see a check box to select the libraries when
installing Visual Studio.

Regards,
Hiroshi Inoue