Visio, new DLL

From: Kovacs Zoltan <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>
To: pgsql-odbc(at)postgresql(dot)org
Cc: fjoe(at)iclub(dot)nsu(dot)ru
Subject: Visio, new DLL
Date: 2001-02-03 11:16:13
Message-ID: Pine.LNX.4.21.0102031211580.15790-100000@pc10.radnoti-szeged.sulinet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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.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 "
"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.lib advapi32.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

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2001-02-04 20:33:32 RE: Visio, new DLL
Previous Message Bruce Momjian 2001-02-03 04:07:39 Re: Hello