PDA

View Full Version : Problem whis open device in Windows



Pavka
9th November 2007, 07:43
Hello!

I write program by using MinGW in WindowsXP for work whis special controller in PCI slot (IDE - Eclipse). The program works correctly in console mode!
For second version of my program I use Qt for realisation GUI (IDE - Eclipse with Qt integration). In this case program works, but i can not access to special controller in PCI slot!!!!!!! I use same code that in console program.
May be I must set any options in .pro file?

Thank you!!!!!!!!!!!!!!!

jpn
9th November 2007, 08:06
Exactly how did you compile the console version?

Pavka
9th November 2007, 08:35
In console of Eclipse at compilation we can see:


g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc\pci\MPCIController.o ..\src\pci\MPCIController.cpp
In file included from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/backward/fstream.h:31,
from ..\src\pci\MPCIController.cpp:18:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from ..\src\pci\MPCIController.cpp:26:
..\src\pci\/drv/DLL_NT_PCI429.H:253:7: warning: no newline at end of file
In file included from ..\src\pci\/../Controller/Win32/..\/ModelBlock/Direction.h:7,
from ..\src\pci\/../Controller/Win32/..\ModelController.h:10,
from ..\src\pci\/../Controller/Win32/BSKIPlaneModel.h:4,
from ..\src\pci\MPCIController.cpp:34:

.
.
.

g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc\Controller\ModelBlock\BSKIInterfase.o ..\src\Controller\ModelBlock\BSKIInterfase.cpp
In file included from ..\src\Controller\ModelBlock\BSKIInterfase.cpp:3:
..\src\Controller\ModelBlock\/../../NavigationMath/CoordTransform/CoordTransform.h:127:7: warning: no newline at end of file
g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc\Controller\ModelController.o ..\src\Controller\ModelController.cpp
In file included from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/backward/iostream.h:31,
from ..\src\Controller\/ModelController.h:7,
from ..\src\Controller\ModelController.cpp:1:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from ..\src\Controller\/ModelBlock/Direction.h:7,
from ..\src\Controller\/ModelController.h:10,
from ..\src\Controller\ModelController.cpp:1:
..\src\Controller\/ModelBlock/../../NavigationMath/CoordTransform/CoordTransform.h:127:7: warning: no newline at end of file

.
.
.

..\src\Controller\Win32\/..\/ModelBlock/../../NavigationMath/CoordTransform/CoordTransform.h:127:7: warning: no newline at end of file
..\src\Controller\Win32\BSKIPlaneModel.cpp: In constructor `BSKIPlaneModel::BSKIPlaneModel()':
..\src\Controller\Win32\BSKIPlaneModel.cpp:17: warning: passing `double' for converting 1 of `void ModelTimer::SetTimerStep(int)'
g++ -LE:\Users\Podzorov\Projects\CPP\Library\ -oFlySimulator.exe src\pci\drv\OpenDeviceBySN.o src\pci\drv\OpenDeviceByIndex.o src\pci\drv\DriverPCI.o src\pci\MPCIController.o src\help\MHelp.o src\fbit\GInfWord.o src\fbit\FBit.o src\NavigationMath\CoordTransform\CoordTransform.o src\Model\ModelData.o src\IO\LogWriter.o src\IO\ConfigFileReader.o src\FlySimulator.o src\Controller\Win32\BSKIPlaneModel.o src\Controller\Timer\Win32\WinTimer.o src\Controller\Timer\ModelTimer.o src\Controller\ModelController.o src\Controller\ModelBlock\Kinematics.o src\Controller\ModelBlock\Direction.o src\Controller\ModelBlock\Block.o src\Controller\ModelBlock\BSKIInterfase.o src\Controller\Interfase\Win32\WinKeyInput.o src\Controller\Interfase\ModelInterfase.o
Build complete for project FlySimulator
Time consumed: 17516 ms.

blue.death
19th November 2007, 10:13
It is my understanding that your app is building correctly under Eclipse. Correct me if I'm wrong.

So, I can only ask you why you say you can't access the device, what error do you get and how do you open the device. Do you use Qt to actually open the device?

If you don't get build errors you need to tell us exactly how you open it and eventually if you get any specific error message.