Root and Windows API for RS232 communication

Hi everyone,

I wrote a simple program in c++ to use the serial port using windows API. Now I have to include this my program in a big one written for ROOT.
I tried to compile my program with ROOT but I always have this error:

#error win32api.dll is not ready. Run ‘setup.bat’…

I tried to install CINT but maybe I did some mistakes and it doesn’t work.
Someone can help me? This is my first experience with ROOT :confused:
Every suggestion will be appreciated :smiley:

Thanks a lot!!

This error is caused becouse a additional library for interfacing the windows api is not ready.
These libraries are found within the <cint_core>/lib folder. They need to be compiled so the functions within the external dll are visible to CINT.

The CINT binary package is compiled with dll_stl and stdstrct libs by default. So you can use the systems original string and some original std:: functions.

Anyway you need to compile the win32api lib within the <cint_core>/lib /win32api folder. To compile cint on windows you need cygwin or msvc.

You need to setup your environment for building the additional libraries or cint.

Read this:
awake24.de/documents/cint/Co … indows.htm

or download this package wich is usefull if you own msvc and do not want to install the huge cygwin distribution:
root.cern.ch/phpBB2/viewtopic.php?t=8935

I hope I made no mistake within my explanation.

Greetings Louis Höfler.

I downloaded the package as you wrote using this link:

root.cern.ch/phpBB2/viewtopic.php?t=8935

I followed the istructions but I have this error after running make-all.bat

G__defined_tagname: Error: class, struct, union or type ‘HANDLE’ is not defined
src\struct.cxx:2133 winfunc.h(131)
!!!Removing G__c_win32api.c G__c_win32api.h !!!
NMAKE : fatal error U1077: ‘C:\cint-svn\bin\cint.exe’ : codice restituito '0x1’
Stop.
NMAKE : fatal error U1077: ‘“C:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\BIN\nmake.exe”’ : codice restituito '0x2’
Stop.
NMAKE : fatal error U1077: ‘“C:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\BIN\nmake.exe”’ : codice restituito '0x2’
Stop.

How can I solve this?
I extracted the compress file and then I ran the file make-all.bat
Is there something else that I must do before this operation?
I tryed with Windows 7 and XP and I have the same problem.

Thanks a lot
Giulio

I tryed to use version 10. Now running make.bat it works…I suppose it works…it finish without errors :confused:
Then when I run vs2008.sln clikking on Build Solution I have this list of errors:

Progetto : error PRJ0002 : Errore 1 restituito da ‘C:\Windows\SysWow64\cmd.exe’.
2>Il log di compilazione è stato salvato in 'file://c:\cint-svn_10\vs2008\iosenum\Debug\BuildLog.htm’
2>iosenum - 1 errore/i, 0 avviso/i
3>------ Inizio compilazione: Progetto: apiif, Configurazione: Debug Win32 ------
3>Evento di pre-compilazione in corso…
3>Progetto : error PRJ0002 : Errore 1 restituito da ‘C:\Windows\SysWow64\cmd.exe’.
3>Il log di compilazione è stato salvato in 'file://c:\cint-svn_10\vs2008\apiif\Debug\BuildLog.htm’
3>apiif - 1 errore/i, 0 avviso/i
4>------ Inizio compilazione: Progetto: libCint, Configurazione: Debug Win32 ------
4>Compilazione in corso…
4>Apiif.cxx
4>c1xx : fatal error C1083: Impossibile aprire il file origine ‘…\cint\src\dict\Apiif.cxx’: No such file or directory
4>rflx_gensrc.cxx
4>c:\cint-svn_10\cint\src\rflx_gensrc.cxx(50) : error C2995: ‘void std::_Swap_adl(_Ty &,_Ty &)’: modello di funzione già definito
4> c:\program files (x86)\microsoft visual studio 9.0\vc\include\utility(29): vedere la dichiarazione di 'std::_Swap_adl’
4>tmplt.cxx
4>c:\cint-svn_10\cint\src\tmplt.cxx(29) : error C2995: ‘void std::_Swap_adl(_Ty &,_Ty &)’: modello di funzione già definito
4> c:\program files (x86)\microsoft visual studio 9.0\vc\include\utility(29): vedere la dichiarazione di 'std::_Swap_adl’
4>Generazione del codice in corso…
4>Il log di compilazione è stato salvato in 'file://c:\cint-svn_10\vs2008\libCint\Debug\BuildLog.htm’
4>libCint - 3 errore/i, 0 avviso/i
5>------ Inizio compilazione: Progetto: cint, Configurazione: Debug Win32 ------
5>Collegamento in corso…
5>LINK : fatal error LNK1104: impossibile aprire il file '.\debug\libcint.lib’
5>Il log di compilazione è stato salvato in 'file://c:\cint-svn_10\vs2008\Debug\BuildLog.htm’
5>cint - 1 errore/i, 0 avviso/i
6>------ Inizio compilazione: Progetto: dll_stl, Configurazione: Debug Win32 ------
6>Evento di pre-compilazione in corso…
6>G__cpp_string.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_string.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_string.obj’
6>G__cpp_vector.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_vector.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_vector.obj’
6>G__cpp_vectorbool.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_vectorbool.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_vectorbool.obj’
6>G__cpp_list.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_list.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_list.obj’
6>G__cpp_deque.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_deque.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_deque.obj’
6>G__cpp_map.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_map.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_map.obj’
6>G__cpp_map2.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_map2.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_map2.obj’
6>G__cpp_set.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_set.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_set.obj’
6>G__cpp_multimap.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_multimap.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_multimap.obj’
6>G__cpp_multimap2.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_multimap2.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_multimap2.obj’
6>G__cpp_multiset.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_multiset.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_multiset.obj’
6>G__cpp_stack.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_stack.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_stack.obj’
6>G__cpp_queue.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_queue.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_queue.obj’
6>G__cpp_valarray.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_valarray.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_valarray.obj’
6>G__cpp_exception.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_exception.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_exception.obj’
6>G__cpp_stdexcept.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_stdexcept.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_stdexcept.obj’
6>G__cpp_climits.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_climits.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_climits.obj’
6>G__cpp_complex.cxx
6>c1xx : fatal error C1083: Impossibile aprire il file origine ‘G__cpp_complex.cxx’: No such file or directory
6>LINK : fatal error LNK1181: impossibile aprire il file di input 'G__cpp_complex.obj’
6>Il log di compilazione è stato salvato in 'file://c:\cint-svn_10\vs2008\dll_stl\Debug\BuildLog.htm’
6>dll_stl - 36 errore/i, 0 avviso/i
========== Compilazione: 0 completate, 6 non riuscite, 3 aggiornate, 0 ignorate ==========

I know that the report is in italian but I think that is easy for you to understand the problem also in this language.
Let me know what can I do…I really need to use Windows API with ROOT :frowning:

Thanks a lot,
Giulio